summaryrefslogtreecommitdiff
path: root/lang/mono/patches/patch-db
blob: bacfbc15b3e82bc03f2d6335c0962cd9f07e63b3 (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
$NetBSD: patch-db,v 1.2 2009/04/28 10:31:58 hasso Exp $

--- mono/utils/mono-proclib.c.orig	2008-11-10 20:56:14 -0800
+++ mono/utils/mono-proclib.c	2009-03-03 15:30:03 -0800
@@ -13,14 +13,19 @@
 #endif
 
 /* FIXME: bsds untested */
-#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__)
+#if defined(__APPLE__) || defined(__FreeBSD__) || defined(__OpenBSD__) || defined(__NetBSD__) || defined(__DragonFly__)
 #include <sys/types.h>
 #include <sys/sysctl.h>
+#ifndef __DragonFly__
 #include <sys/proc.h>
+#endif
 #ifdef HAVE_SYS_USER_H
 #include <sys/user.h>
 #endif
-#ifdef HAVE_STRUCT_KINFO_PROC_KP_PROC
+#ifdef __DragonFly__
+#define kinfo_pid_member kp_pid
+#define kinfo_name_member kp_comm
+#elif HAVE_STRUCT_KINFO_PROC_KP_PROC
 #define kinfo_pid_member kp_proc.p_pid
 #define kinfo_name_member kp_proc.p_comm
 #else