summaryrefslogtreecommitdiff
path: root/debug.c
diff options
context:
space:
mode:
authorSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:51:34 +0000
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2013-02-11 23:51:34 +0000
commit3f06ded61ba1373f44e87d1f6d266fb3baa29314 (patch)
tree90d28ef7d22402021f3a4fddd41c6d2bc674f629 /debug.c
parent7fc534e167e8ebf3e7267fca5db7e34c9bc15538 (diff)
Fix build against libpthread
* Makefile (LDFLAGS): Replace -lthreads with -lpthread. * cache.c: Use pthread functions instead of cthreads functions. * cache.h: Likewise. * debug.c: Likewise. * netfs.c: Likewise. * tarfs.c: Likewise. * tarfs.h: Likewise. * tarlist.c: Likewise. * zipstores.c: Likewise.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/debug.c b/debug.c
index ed839501b..2f61fbc63 100644
--- a/debug.c
+++ b/debug.c
@@ -26,10 +26,10 @@
#include <errno.h>
#include <error.h>
#include <string.h>
-#include <cthreads.h>
+#include <pthread.h>
-static struct mutex debug_lock;
+static pthread_mutex_t debug_lock;
static char *debug_function = NULL;
static FILE *debug_file = NULL;
@@ -54,7 +54,7 @@ __debug_start (const char *function)
if (!debug_file)
return;
- mutex_lock (&debug_lock);
+ pthread_mutex_lock (&debug_lock);
debug_function = strdup (function);
}
@@ -84,5 +84,5 @@ __debug_end ()
free (debug_function);
debug_function = NULL;
fflush (debug_file);
- mutex_unlock (&debug_lock);
+ pthread_mutex_unlock (&debug_lock);
}