]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Check for nanosleep in librt, when not in libc. Reported by Joern Clausen.
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 13 Jul 2013 08:59:04 +0000 (10:59 +0200)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 13 Jul 2013 08:59:04 +0000 (10:59 +0200)
configure.ac

index 7f597d715fe62a9ba939aaff3b5222a5f24b8b90..006f334c936896b6d05efaef2d63acd32a964c88 100644 (file)
@@ -206,13 +206,17 @@ AC_PROG_LIBTOOL
 
 dnl No fork on MinGW, disable some self-tests until we fix them.
 dnl Check clock_gettime and pthread_mutex_lock in libc (avoid linking to other libs)
-AC_CHECK_FUNCS([fork getrusage getpwuid_r daemon getpid clock_gettime pthread_mutex_lock],,)
+AC_CHECK_FUNCS([fork getrusage getpwuid_r nanosleep daemon getpid clock_gettime pthread_mutex_lock],,)
 AM_CONDITIONAL(HAVE_FORK, test "$ac_cv_func_fork" != "no")
 
 if test "$ac_cv_func_pthread_mutex_lock" != "yes";then
   AC_LIB_HAVE_LINKFLAGS(pthread,, [#include <pthread.h>], [pthread_mutex_lock (0);])
 fi
 
+if test "$ac_cv_func_nanosleep" != "yes";then
+  AC_LIB_HAVE_LINKFLAGS(rt,, [#include <time.h>], [nanosleep (0, 0);])
+fi
+
 AC_MSG_CHECKING([whether to build libdane])
 AC_ARG_ENABLE(libdane,
     AS_HELP_STRING([--disable-libdane],