pkgsrc-WIP-changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

radare2-git: Fix NetBSD build



Module Name:	pkgsrc-wip
Committed By:	Kamil Rytarowski <n54%gmx.com@localhost>
Pushed By:	kamil
Date:		Tue Jul 19 01:17:08 2016 +0200
Changeset:	cf9e5fb4cadc393186e35fc5caed9f82bf4866cd

Modified Files:
	radare2-git/distinfo
Added Files:
	radare2-git/patches/patch-libr_debug_p_debug__native.c

Log Message:
radare2-git: Fix NetBSD build

To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=cf9e5fb4cadc393186e35fc5caed9f82bf4866cd

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

diffstat:
 radare2-git/distinfo                               |  1 +
 .../patches/patch-libr_debug_p_debug__native.c     | 43 ++++++++++++++++++++++
 2 files changed, 44 insertions(+)

diffs:
diff --git a/radare2-git/distinfo b/radare2-git/distinfo
index 095a626..7b49a0f 100644
--- a/radare2-git/distinfo
+++ b/radare2-git/distinfo
@@ -3,3 +3,4 @@ $NetBSD: distinfo,v 1.1 2014/12/05 00:50:56 krytarowski Exp $
 SHA1 (radare2-0.9.8.tar.xz) = 7fce08c3d08749e91a0ce3bee177ba389ae145f4
 RMD160 (radare2-0.9.8.tar.xz) = 8a8ab14d14e61117f48b59c8c8aadb81baf2da5e
 Size (radare2-0.9.8.tar.xz) = 4614588 bytes
+SHA1 (patch-libr_debug_p_debug__native.c) = 7611351f4891adf1dbc023126b751f4ad388ae72
diff --git a/radare2-git/patches/patch-libr_debug_p_debug__native.c b/radare2-git/patches/patch-libr_debug_p_debug__native.c
new file mode 100644
index 0000000..c7bb0bd
--- /dev/null
+++ b/radare2-git/patches/patch-libr_debug_p_debug__native.c
@@ -0,0 +1,43 @@
+$NetBSD$
+
+--- libr/debug/p/debug_native.c.orig	2016-07-18 23:01:08.145880903 +0000
++++ libr/debug/p/debug_native.c
+@@ -508,13 +508,22 @@ static RList *r_debug_native_pids (int p
+ 		}
+ 	}
+ #else /* rest is BSD */
+-#ifdef __OpenBSD__
++#ifdef __NetBSD__
++# define KVM_OPEN_FLAG KVM_NO_FILES
++# define KVM_GETPROCS(kd, opt, arg, cntptr) \
++	kvm_getproc2 (kd, opt, arg, sizeof(struct kinfo_proc2), cntptr)
++# define KP_COMM(x) (x)->p_comm
++# define KP_PID(x) (x)->p_pid
++# define KP_PPID(x) (x)->p_ppid
++# define KINFO_PROC kinfo_proc2
++#elif defined(__OpenBSD__)
+ # define KVM_OPEN_FLAG KVM_NO_FILES
+ # define KVM_GETPROCS(kd, opt, arg, cntptr) \
+ 	kvm_getprocs (kd, opt, arg, sizeof(struct kinfo_proc), cntptr)
+ # define KP_COMM(x) (x)->p_comm
+ # define KP_PID(x) (x)->p_pid
+ # define KP_PPID(x) (x)->p_ppid
++# define KINFO_PROC kinfo_proc
+ #else
+ # define KVM_OPEN_FLAG O_RDONLY
+ # define KVM_GETPROCS(kd, opt, arg, cntptr) \
+@@ -522,11 +531,12 @@ static RList *r_debug_native_pids (int p
+ # define KP_COMM(x) (x)->ki_comm
+ # define KP_PID(x) (x)->ki_pid
+ # define KP_PPID(x) (x)->ki_ppid
++# define KINFO_PROC kinfo_proc
+ #endif
+ 	char errbuf[_POSIX2_LINE_MAX];
+-	struct kinfo_proc* kp;
++	struct KINFO_PROC* kp;
+ 	int cnt = 0;
+-	kvm_t* kd = kvm_openfiles (NULL, NULL, NULL, KVM_OPEN_FLAG, &errbuf);
++	kvm_t* kd = kvm_openfiles (NULL, NULL, NULL, KVM_OPEN_FLAG, errbuf);
+ 	if (!kd) {
+ 		eprintf ("kvm_openfiles says %s\n", errbuf);
+ 		return NULL;


Home | Main Index | Thread Index | Old Index