diff options
| author | 2017-07-17 21:08:15 +0200 | |
|---|---|---|
| committer | 2017-07-17 21:08:15 +0200 | |
| commit | 8a5545de25d243955c68fb8d6c1bd9ef856b8e8a (patch) | |
| tree | de81ef2899cc4a0e719065d334d9776550eaca4a | |
| parent | 35e5d48f29ae03b2b9686109e4ed9ab8b9677ce8 (diff) | |
| download | usbmuxd-8a5545de25d243955c68fb8d6c1bd9ef856b8e8a.tar.gz usbmuxd-8a5545de25d243955c68fb8d6c1bd9ef856b8e8a.tar.bz2 | |
utils: Use autoconf to check for availability of clock_gettime()
| -rw-r--r-- | configure.ac | 2 | ||||
| -rw-r--r-- | src/utils.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index 5e8fad7..b836f45 100644 --- a/configure.ac +++ b/configure.ac | |||
| @@ -96,7 +96,7 @@ AC_TYPE_UINT8_T | |||
| 96 | AC_FUNC_MALLOC | 96 | AC_FUNC_MALLOC |
| 97 | AC_FUNC_REALLOC | 97 | AC_FUNC_REALLOC |
| 98 | AC_CHECK_FUNCS([strcasecmp strdup strerror strndup stpcpy]) | 98 | AC_CHECK_FUNCS([strcasecmp strdup strerror strndup stpcpy]) |
| 99 | AC_CHECK_FUNCS([ppoll]) | 99 | AC_CHECK_FUNCS([ppoll clock_gettime]) |
| 100 | 100 | ||
| 101 | # Check for operating system | 101 | # Check for operating system |
| 102 | AC_MSG_CHECKING([whether to enable WIN32 build settings]) | 102 | AC_MSG_CHECKING([whether to enable WIN32 build settings]) |
diff --git a/src/utils.c b/src/utils.c index 67860b3..28664d4 100644 --- a/src/utils.c +++ b/src/utils.c | |||
| @@ -302,7 +302,7 @@ int plist_write_to_filename(plist_t plist, const char *filename, enum plist_form | |||
| 302 | return 1; | 302 | return 1; |
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | #ifdef __APPLE__ | 305 | #ifndef HAVE_CLOCK_GETTIME |
| 306 | typedef int clockid_t; | 306 | typedef int clockid_t; |
| 307 | #define CLOCK_MONOTONIC 1 | 307 | #define CLOCK_MONOTONIC 1 |
| 308 | 308 | ||
