c7fe568889
available for the datastore. It almost works now. (On NetBSD 2.0, it runs for me, but has a lot of trouble trying to connect to peers; it will open connections in nonblocking mode, but somehow not get any responses to "sent" data. Methinks there are some nonblocking socket no-no's in the code that just happen to work on Linux.)
28 lines
725 B
Text
28 lines
725 B
Text
$NetBSD: patch-ab,v 1.2 2004/11/06 03:35:19 tvierling Exp $
|
|
|
|
--- src/util/semaphore.c.orig 2004-09-12 14:33:00.000000000 -0400
|
|
+++ src/util/semaphore.c
|
|
@@ -35,7 +35,9 @@
|
|
#if FREEBSD
|
|
#include <semaphore.h>
|
|
#endif
|
|
-#if SOMEBSD
|
|
+#if NETBSD
|
|
+# include <pthread.h>
|
|
+#elif SOMEBSD
|
|
# include <pthread_np.h>
|
|
#endif
|
|
#if SOMEBSD || OSX
|
|
@@ -133,10 +135,10 @@ void create_recursive_mutex_(Mutex * mut
|
|
#if LINUX
|
|
pthread_mutexattr_setkind_np(&attr,
|
|
PTHREAD_MUTEX_RECURSIVE_NP);
|
|
-#elif SOMEBSD
|
|
+#elif SOMEBSD && !NETBSD
|
|
pthread_mutexattr_setkind_np(&attr,
|
|
PTHREAD_MUTEX_RECURSIVE);
|
|
-#elif SOLARIS
|
|
+#elif SOLARIS || NETBSD
|
|
pthread_mutexattr_settype(&attr,
|
|
PTHREAD_MUTEX_RECURSIVE);
|
|
#elif OSX
|