pkgsrc-Users archive

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

Re: Error compiling iftop on OS X



On Mon, Mar 06, 2006 at 02:31:02PM +0100, Philipp Riegger wrote:
> I got an error compiling iftop on OSX:

Try the attached patch.

Joerg
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/net/iftop/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo    24 Feb 2005 12:13:50 -0000      1.2
+++ distinfo    6 Mar 2006 15:23:08 -0000
@@ -3,3 +3,4 @@
 SHA1 (iftop-0.16.tar.gz) = 6ac701e87b9ed3b7ce4d6e0a286006889d956701
 RMD160 (iftop-0.16.tar.gz) = 5423408f1bb5e8f4e16b0cb8f5523bd6cd424b32
 Size (iftop-0.16.tar.gz) = 153446 bytes
+SHA1 (patch-aa) = 0c3b1ed10a9135167e40cc8d220ba3e19e992b45
Index: patches/patch-aa
===================================================================
RCS file: patches/patch-aa
diff -N patches/patch-aa
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-aa    6 Mar 2006 15:23:08 -0000
@@ -0,0 +1,21 @@
+$NetBSD$
+
+--- resolver.c.orig    2006-03-06 16:18:52.000000000 +0100
++++ resolver.c
+@@ -301,6 +301,7 @@ char *do_resolve(struct in_addr *addr) {
+     static pthread_mutex_t worker_init_mtx = PTHREAD_MUTEX_INITIALIZER;
+     static pthread_key_t worker_key;
+     static int gotkey;
++    int status;
+ 
+     /* If no process exists, we need to spawn one. */
+     pthread_mutex_lock(&worker_init_mtx);
+@@ -341,7 +342,7 @@ char *do_resolve(struct in_addr *addr) {
+         || read(workerinfo->fd, name, NAMESIZE) != NAMESIZE) {
+         /* Something went wrong. Just kill the child and get on with it. */
+         kill(workerinfo->child, SIGKILL);
+-        wait();
++        wait(&status);
+         close(workerinfo->fd);
+         xfree(workerinfo);
+         pthread_setspecific(worker_key, NULL);


Home | Main Index | Thread Index | Old Index