From 3f06ded61ba1373f44e87d1f6d266fb3baa29314 Mon Sep 17 00:00:00 2001 From: Samuel Thibault Date: Mon, 11 Feb 2013 23:51:34 +0000 Subject: 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. --- cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'cache.c') diff --git a/cache.c b/cache.c index 685e0ea04..fefc36857 100644 --- a/cache.c +++ b/cache.c @@ -32,8 +32,8 @@ #include "debug.h" /* Locking/unlocking a node's cache */ -#define LOCK(Node) mutex_lock (&CACHE_INFO ((Node), lock)) -#define UNLOCK(Node) mutex_unlock (&CACHE_INFO ((Node), lock)); +#define LOCK(Node) pthread_mutex_lock (&CACHE_INFO ((Node), lock)) +#define UNLOCK(Node) pthread_mutex_unlock (&CACHE_INFO ((Node), lock)); /* Tar file callback (in tarfs.c). */ static error_t (* read_file) (struct node *node, @@ -76,7 +76,7 @@ cache_create (struct node *node) CACHE_INFO (node, size) = blocks; debug (("Node %s: Initial block vector size: %u", node->nn->name, blocks)); - mutex_init (&CACHE_INFO (node, lock)); + pthread_mutex_init (&CACHE_INFO (node, lock), NULL); return 0; } -- cgit v1.2.3