blob: b4f343d0363b4355ec705f03cb01b3473ead4a92 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
$NetBSD: patch-db,v 1.9 2014/11/30 08:40:51 spz Exp $
--- mono/utils/mono-proclib.c.orig 2014-09-22 13:23:09.000000000 +0000
+++ mono/utils/mono-proclib.c
@@ -19,23 +19,28 @@
#include <process.h>
#endif
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
#include <sys/param.h>
#include <sys/types.h>
#include <sys/sysctl.h>
+#ifndef __DragonFly__
#include <sys/proc.h>
+#endif
#if defined(__APPLE__)
#include <mach/mach.h>
#endif
#ifdef HAVE_SYS_USER_H
#include <sys/user.h>
#endif
-#ifdef HAVE_STRUCT_KINFO_PROC_KP_PROC
+#if defined(HAVE_STRUCT_KINFO_PROC_KP_PROC) && !defined(__NetBSD__)
# define kinfo_pid_member kp_proc.p_pid
# define kinfo_name_member kp_proc.p_comm
-#elif defined(__OpenBSD__)
+#elif defined(__OpenBSD__) || defined(__NetBSD__)
# define kinfo_pid_member p_pid
# define kinfo_name_member p_comm
+#elif defined(__DragonFly__)
+# define kinfo_pid_member kp_pid
+# define kinfo_name_member kp_comm
#else
#define kinfo_pid_member ki_pid
#define kinfo_name_member ki_comm
|