HAVE_PTHREAD instead of HAVE_PTHREADS like unbound

This commit is contained in:
Willem Toorop 2017-03-09 11:46:15 +01:00
parent 5a2ee50de3
commit 5b5123a79d
3 changed files with 7 additions and 7 deletions

View File

@ -992,7 +992,7 @@ fi
#---- check for pthreads library
AC_SEARCH_LIBS([pthread_mutex_init],[pthread],[AC_DEFINE([HAVE_PTHREADS], [1], [Have pthreads library])], [AC_MSG_WARN([pthreads not available])])
AC_SEARCH_LIBS([pthread_mutex_init],[pthread],[AC_DEFINE([HAVE_PTHREAD], [1], [Have pthreads library])], [AC_MSG_WARN([pthreads not available])])
AC_MSG_CHECKING([whether the C compiler (${CC-cc}) supports the __func__ variable])
AC_LANG_PUSH(C)
@ -1008,7 +1008,7 @@ dnl ----- Start of "Things needed for gldns" section
dnl -----
dnl ---------------------------------------------------------------------------
AC_CHECK_HEADERS([stdarg.h stdint.h netinet/in.h arpa/inet.h netdb.h sys/socket.h time.h sys/time.h sys/select.h],,, [AC_INCLUDES_DEFAULT])
AC_CHECK_HEADERS([stdarg.h stdint.h netinet/in.h arpa/inet.h netdb.h sys/socket.h time.h sys/time.h sys/select.h endian.h],,, [AC_INCLUDES_DEFAULT])
dnl Check the printf-format attribute (if any)
dnl result in HAVE_ATTR_FORMAT.

View File

@ -34,7 +34,7 @@
#include "config.h"
#define LOCKRET(func) func
#ifdef HAVE_PTHREADS
#ifdef HAVE_PTHREAD
#include "pthread.h"
static pthread_mutex_t arc_lock = PTHREAD_MUTEX_INITIALIZER;

View File

@ -62,7 +62,7 @@ typedef unsigned short in_port_t;
#include <assert.h>
#include <ctype.h>
#ifdef HAVE_PTHREADS
#ifdef HAVE_PTHREAD
#include <pthread.h>
#endif
#include <stdbool.h>
@ -93,7 +93,7 @@ typedef unsigned short in_port_t;
upstream. Using 1 hour for all transports - based on RFC7858 value for for TLS.*/
#define BACKOFF_RETRY 3600
#ifdef HAVE_PTHREADS
#ifdef HAVE_PTHREAD
static pthread_mutex_t ssl_init_lock = PTHREAD_MUTEX_INITIALIZER;
#endif
static bool ssl_init=false;
@ -1434,7 +1434,7 @@ getdns_context_create_with_extended_memory_functions(
/* Unbound needs SSL to be init'ed this early when TLS is used. However we
* don't know that till later so we will have to do this every time. */
#ifdef HAVE_PTHREADS
#ifdef HAVE_PTHREAD
pthread_mutex_lock(&ssl_init_lock);
#else
/* XXX implement Windows-style lock here */
@ -1444,7 +1444,7 @@ getdns_context_create_with_extended_memory_functions(
SSL_library_init();
ssl_init = true;
}
#ifdef HAVE_PTHREADS
#ifdef HAVE_PTHREAD
pthread_mutex_unlock(&ssl_init_lock);
#else
/* XXX implement Windows-style unlock here */