Skip to content

Commit

Permalink
configure.ac: Don't use pthread_time when not on WIN32
Browse files Browse the repository at this point in the history
This moves the uglyness at configure time, and also clarifies the
config.log

Signed-off-by: Jean-Baptiste Kempf <[email protected]>
  • Loading branch information
chouquette authored and jbkempf committed May 12, 2016
1 parent 8d6e941 commit 4315c46
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion compat/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 3 additions & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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])
Expand Down

0 comments on commit 4315c46

Please sign in to comment.