openbsd-ports/lang/mono/patches/patch-mono_utils_mono-proclib_c
2011-03-02 08:37:51 +00:00

28 lines
780 B
Plaintext

$OpenBSD: patch-mono_utils_mono-proclib_c,v 1.10 2011/03/02 08:37:51 robert Exp $
--- mono/utils/mono-proclib.c.orig Wed Feb 23 20:21:01 2011
+++ mono/utils/mono-proclib.c Sun Feb 27 14:15:30 2011
@@ -24,17 +24,17 @@
#ifdef HAVE_SYS_USER_H
#include <sys/user.h>
#endif
-#ifdef HAVE_STRUCT_KINFO_PROC_KP_PROC
-# ifdef KERN_PROC2
+#ifdef KERN_PROC2
# define kinfo_pid_member p_pid
# define kinfo_name_member p_comm
-# else
+#else
+# ifdef HAVE_STRUCT_KINFO_PROC_KP_PROC
# define kinfo_pid_member kp_proc.p_pid
# define kinfo_name_member kp_proc.p_comm
+# else
+# define kinfo_pid_member ki_pid
+# define kinfo_name_member ki_comm
# endif
-#else
-#define kinfo_pid_member ki_pid
-#define kinfo_name_member ki_comm
#endif
#define USE_SYSCTL 1
#endif