Procházet zdrojové kódy

configure.ac: Don't use pthread_time when not on WIN32

This moves the uglyness at configure time, and also clarifies the
config.log

Signed-off-by: Jean-Baptiste Kempf <jb@videolan.org>
Hugo Beauzée-Luyssen před 9 roky
rodič
revize
4315c46b83
2 změnil soubory, kde provedl 4 přidání a 2 odebrání
  1. 1 1
      compat/compat.h
  2. 3 1
      configure.ac

+ 1 - 1
compat/compat.h

@@ -38,7 +38,7 @@ size_t strlcpy(char *dst, const char *src, size_t siz);
 #ifndef HAVE_CLOCKID_T
 typedef int clockid_t;
 #endif
-#if !HAVE_DECL_CLOCK_MONOTONIC && defined(_WIN32)
+#if !HAVE_DECL_CLOCK_MONOTONIC
 enum {
     CLOCK_REALTIME,
     CLOCK_MONOTONIC,

+ 3 - 1
configure.ac

@@ -93,7 +93,9 @@ AC_CHECK_TYPES([clockid_t],,,[
                #include <pthread.h>])
 AC_CHECK_DECLS([CLOCK_MONOTONIC],,,[
                #include <time.h>
-               #include <pthread_time.h>])
+               #ifdef _WIN32
+               #include <pthread_time.h>
+               #endif])
 AC_REPLACE_FUNCS([strlcpy])
 AC_REPLACE_FUNCS([strndup])
 AC_REPLACE_FUNCS([clock_gettime])