diff options
| author | Brent Cook <busterb@gmail.com> | 2018-03-23 13:45:05 -0500 |
|---|---|---|
| committer | Brent Cook <busterb@gmail.com> | 2018-03-23 13:45:05 -0500 |
| commit | 6b513a1c78b8a8c4c48b9ef476628728974f3171 (patch) | |
| tree | 7da788236665e3f408c65ac05d9278202213ff82 /include | |
| parent | 4b2a8cd1c16896ca5d4570656435aa1b69bcbd46 (diff) | |
| download | portable-6b513a1c78b8a8c4c48b9ef476628728974f3171.tar.gz portable-6b513a1c78b8a8c4c48b9ef476628728974f3171.tar.bz2 portable-6b513a1c78b8a8c4c48b9ef476628728974f3171.zip | |
add proper guard and typedef
Diffstat (limited to 'include')
| -rw-r--r-- | include/compat/time.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/include/compat/time.h b/include/compat/time.h index fb0ab29..8f08c9a 100644 --- a/include/compat/time.h +++ b/include/compat/time.h | |||
| @@ -3,6 +3,9 @@ | |||
| 3 | * sys/time.h compatibility shim | 3 | * sys/time.h compatibility shim |
| 4 | */ | 4 | */ |
| 5 | 5 | ||
| 6 | #ifndef LIBCRYPTOCOMPAT_TIME_H | ||
| 7 | #define LIBCRYPTOCOMPAT_TIME_H | ||
| 8 | |||
| 6 | #ifdef _MSC_VER | 9 | #ifdef _MSC_VER |
| 7 | #if _MSC_VER >= 1900 | 10 | #if _MSC_VER >= 1900 |
| 8 | #include <../ucrt/time.h> | 11 | #include <../ucrt/time.h> |
| @@ -31,7 +34,8 @@ time_t timegm(struct tm *tm); | |||
| 31 | #endif | 34 | #endif |
| 32 | 35 | ||
| 33 | #ifndef HAVE_CLOCK_GETTIME | 36 | #ifndef HAVE_CLOCK_GETTIME |
| 34 | int clock_gettime(int clock_id, struct timespec *tp); | 37 | typedef int clockid_t; |
| 38 | int clock_gettime(clockid_t clock_id, struct timespec *tp); | ||
| 35 | #endif | 39 | #endif |
| 36 | 40 | ||
| 37 | #ifndef timespecsub | 41 | #ifndef timespecsub |
| @@ -45,3 +49,5 @@ int clock_gettime(int clock_id, struct timespec *tp); | |||
| 45 | } \ | 49 | } \ |
| 46 | } while (0) | 50 | } while (0) |
| 47 | #endif | 51 | #endif |
| 52 | |||
| 53 | #endif | ||
