[Iftop-users] POSIX threads error during configure

Matt Hersant mhearse at hotmail.com
Wed, 14 Apr 2004 04:27:11 +0000


I am trying to build  iftop-0.16 on Solaris 9.  GCC 3.2.  I'm receiving the 
same error that others have reported.

configure: error: can't figure out how to compile with POSIX threads
  If your system actually supports POSIX threads, this means we've messed 
up.

I tried to apply the patch on versions 0.15 and 0.16, with no luck.

diff -u -r1.2 pthread.c
--- pthread.c   27 Aug 2003 18:29:27 -0000      1.2
+++ pthread.c   17 Nov 2003 19:40:27 -0000
@@ -12,6 +12,7 @@
#include <stdio.h>
#include <string.h>
#include <time.h>
+#include <unistd.h>

static pthread_mutex_t mtx = PTHREAD_MUTEX_INITIALIZER;
static pthread_cond_t cond = PTHREAD_COND_INITIALIZER;
@@ -23,8 +24,10 @@
     pthread_mutex_lock(&mtx);
     pthread_cond_signal(&cond);
     pthread_mutex_unlock(&mtx);
-    while (1)
+    while (1) {
+        sleep(1);
         pthread_testcancel();
+    }
}

Any direction?

_________________________________________________________________
Persistent heartburn? Check out Digestive Health & Wellness for information 
and advice. http://gerd.msn.com/default.asp