Merge pull request #5299 from cherusker/cherusker-2017-08-01-next-generic-inst-id
[mono.git] / mono / metadata / w32process-unix-default.c
index 0b48370f369328e924f61d58f3a6dfddb9691699..3bc10906b8cf008b7dfeac476ec147708730d5e7 100644 (file)
@@ -1,3 +1,6 @@
+/**
+ * \file
+ */
 
 #include "w32process.h"
 #include "w32process-unix-internals.h"
 #endif
 #endif
 
+/* makedev() macro */
+#ifdef MAJOR_IN_MKDEV
+#include <sys/mkdev.h>
+#elif defined MAJOR_IN_SYSMACROS
+#include <sys/sysmacros.h>
+#endif
+
 #include "utils/mono-logger-internals.h"
 
 #ifndef MAXPATHLEN
@@ -142,8 +152,10 @@ mono_w32process_get_modules (pid_t pid)
        guint64 device;
 
        fp = open_process_map (pid, "r");
-       if (!fp)
+       if (!fp) {
+               mono_trace (G_LOG_LEVEL_DEBUG, MONO_TRACE_IO_LAYER, "%s: Can't open process map file for pid %d", __func__, pid);
                return NULL;
+       }
 
        while (fgets (buf, sizeof(buf), fp)) {
                p = buf;