pkgsrc/lang/mono/patches/patch-db
2009-03-04 01:09:19 +00:00

24 lines
805 B
Text

--- 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