openbsd-ports/lang/mono/patches/patch-mono_utils_mono-proclib_c
sthen d15e1ce121 Reorder the ifdefs so this works both with and without kvm_getprocs.
It didn't build on -current before, and no change on systems with
kvm_getprocs removed, so no need to bump.

Thanks naddy@ for report + build test.
2010-10-27 14:45:26 +00:00

28 lines
778 B
Plaintext

$OpenBSD: patch-mono_utils_mono-proclib_c,v 1.9 2010/10/27 14:45:26 sthen Exp $
--- mono/utils/mono-proclib.c.orig Tue Oct 5 21:59:29 2010
+++ mono/utils/mono-proclib.c Wed Oct 27 15:39:35 2010
@@ -21,17 +21,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