diff --git a/lib_acl/StdAfx.h b/lib_acl/StdAfx.h index 359eb620b..178af4f4c 100644 --- a/lib_acl/StdAfx.h +++ b/lib_acl/StdAfx.h @@ -30,7 +30,9 @@ int acl_secure_vsnprintf(char *buf, size_t size, const char *fmt, va_list ap); # ifndef _GNU_SOURCE # define _GNU_SOURCE # endif - +# ifndef __USE_UNIX98 +# define __USE_UNIX98 +# endif # include # include # include diff --git a/lib_acl/src/stdlib/acl_mylog.c b/lib_acl/src/stdlib/acl_mylog.c index 72b77ad2e..8e1e6031e 100644 --- a/lib_acl/src/stdlib/acl_mylog.c +++ b/lib_acl/src/stdlib/acl_mylog.c @@ -18,6 +18,12 @@ #elif defined(ACL_UNIX) #include #include +#ifndef _GNU_SOURCE +#define _GNU_SOURCE +#endif +#ifndef __USE_UNIX98 +# define __USE_UNIX98 +#endif #include #include #include @@ -113,7 +119,7 @@ static void init_log_mutex(acl_pthread_mutex_t *lock) pthread_mutexattr_t attr; n1 = pthread_mutexattr_init(&attr); - n2 = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE); + n2 = pthread_mutexattr_settype(&attr, PTHREAD_MUTEX_RECURSIVE_NP); thread_mutex_init(lock, !n1 && !n2 ? &attr : NULL); #else thread_mutex_init(lock, NULL); diff --git a/lib_acl/src/stdlib/memory/acl_mempool.c b/lib_acl/src/stdlib/memory/acl_mempool.c index abbd7ea53..f3f1a85e6 100644 --- a/lib_acl/src/stdlib/memory/acl_mempool.c +++ b/lib_acl/src/stdlib/memory/acl_mempool.c @@ -20,6 +20,9 @@ # ifndef _GNU_SOURCE # define _GNU_SOURCE # endif +# ifndef __USE_UNIX98 +# define __USE_UNIX98 +# endif # include #endif