diff options
author | Andreas Schneider <asn@cryptomilk.org> | 2013-07-03 16:23:44 +0200 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2013-07-03 16:23:44 +0200 |
commit | 794619ffb4db4af0ddaf890cebe8efd14ffaf5de (patch) | |
tree | 1947baa8f6b094877c232ca21848c62a44b164a6 | |
parent | a79b6fb7c2941e5fd1b58414d1d8778f86ceab5d (diff) | |
download | socket_wrapper-794619ffb4db4af0ddaf890cebe8efd14ffaf5de.tar.gz socket_wrapper-794619ffb4db4af0ddaf890cebe8efd14ffaf5de.tar.xz socket_wrapper-794619ffb4db4af0ddaf890cebe8efd14ffaf5de.zip |
cmake: Check for getimeofday on MacOSX correctly.
-rw-r--r-- | ConfigureChecks.cmake | 6 | ||||
-rw-r--r-- | config.h.cmake | 1 | ||||
-rw-r--r-- | src/socket_wrapper.c | 2 |
3 files changed, 8 insertions, 1 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 151745a..ec72b4e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -91,6 +91,12 @@ check_prototype_definition(gettimeofday "sys/time.h" HAVE_GETTIMEOFDAY_TZ) +check_prototype_definition(gettimeofday + "int gettimeofday(struct timeval *tv, void *tzp)" + "-1" + "sys/time.h" + HAVE_GETTIMEOFDAY_TZ_VOID) + # IPV6 check_c_source_compiles(" #include <stdlib.h> diff --git a/config.h.cmake b/config.h.cmake index 6302645..03bd301 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -25,6 +25,7 @@ /*************************** LIBRARIES ***************************/ #cmakedefine HAVE_GETTIMEOFDAY_TZ 1 +#cmakedefine HAVE_GETTIMEOFDAY_TZ_VOID 1 /**************************** OPTIONS ****************************/ diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index e0d29e0..4465d34 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -140,7 +140,7 @@ enum swrap_dbglvl_e { (item)->next = NULL; \ } while (0) -#ifdef HAVE_GETTIMEOFDAY_TZ +#if defined(HAVE_GETTIMEOFDAY_TZ) || defined(HAVE_GETTIMEOFDAY_TZ_VOID) #define swrapGetTimeOfDay(tval) gettimeofday(tval,NULL) #else #define swrapGetTimeOfDay(tval) gettimeofday(tval) |