]> git.ipfire.org Git - thirdparty/unbound.git/commitdiff
Fixup locks to be more portable in compat.
authorWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jul 2014 13:25:37 +0000 (13:25 +0000)
committerWouter Wijngaards <wouter@nlnetlabs.nl>
Fri, 11 Jul 2014 13:25:37 +0000 (13:25 +0000)
git-svn-id: file:///svn/unbound/trunk@3169 be551aaa-1e26-0410-a405-d3ace91eadb9

Makefile.in
compat/arc4_lock.c
util/locks.h

index 185db6d0eaae32d81d4caf767d15d3675f038d08..742b0fba15a40d39f003123c1d6cca9a1a244a65 100644 (file)
@@ -163,7 +163,7 @@ HOST_OBJ=unbound-host.lo
 HOST_OBJ_LINK=$(HOST_OBJ) $(SLDNS_OBJ) $(COMPAT_OBJ_WITHOUT_CTIMEARC4) @WIN_HOST_OBJ_LINK@
 UBANCHOR_SRC=smallapp/unbound-anchor.c
 UBANCHOR_OBJ=unbound-anchor.lo
-UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) log.lo locks.lo \
+UBANCHOR_OBJ_LINK=$(UBANCHOR_OBJ) \
 $(COMPAT_OBJ_WITHOUT_CTIME) @WIN_UBANCHOR_OBJ_LINK@
 TESTBOUND_SRC=testcode/testbound.c testcode/testpkts.c \
 daemon/worker.c daemon/acl_list.c daemon/daemon.c daemon/stats.c \
index c30bcfdf99b748a7692db16d9792e236879c8530..ce8bb4168d642cd0d9e8459d551dcd666857d08b 100644 (file)
@@ -32,6 +32,7 @@
  * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #include "config.h"
+#define LOCKRET(func) func
 #include "util/locks.h"
 
 void _ARC4_LOCK(void);
index d63e5f03201eed6edd158229e72ebc1942a7c66a..6d9cf853e9abb77a0a92bb65b804e0843c5fc63d 100644 (file)
@@ -55,8 +55,8 @@
  * Also thread creation and deletion functions are defined here.
  */
 
+#ifndef LOCKRET
 #include "util/log.h"
-
 /**
  * The following macro is used to check the return value of the
  * pthread calls. They return 0 on success and an errno on error.
@@ -68,6 +68,7 @@
                log_err("%s at %d could not " #func ": %s", \
                __FILE__, __LINE__, strerror(lockret_err));     \
        } while(0)
+#endif
 
 /** DEBUG: use thread debug whenever possible */
 #if defined(HAVE_PTHREAD) && defined(HAVE_PTHREAD_SPINLOCK_T) && defined(ENABLE_LOCK_CHECKS)