diff options
author | Wolfgang Hommel <wolf@code-wizards.com> | 2011-07-30 10:58:12 +0200 |
---|---|---|
committer | Wolfgang Hommel <wolf@code-wizards.com> | 2011-07-30 10:58:12 +0200 |
commit | f07939d9489f9426ccf6926bc716f0a673c69507 (patch) | |
tree | ac5069bb8100d2883cc2ee1adf14115fc6a1ab8c /test/timetest.c | |
parent | 68ccdb74b5d8a06ca8c722821ca4354ed48fcf56 (diff) | |
download | libfaketime-f07939d9489f9426ccf6926bc716f0a673c69507.tar.gz |
Minor adaptions for Mac OS X
Diffstat (limited to 'test/timetest.c')
-rw-r--r-- | test/timetest.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/timetest.c b/test/timetest.c index 2177730..36e208c 100644 --- a/test/timetest.c +++ b/test/timetest.c @@ -36,7 +36,9 @@ int main (int argc, char **argv) { time_t now; struct timeb tb; struct timeval tv; +#ifndef __APPLE__ struct timespec ts; +#endif #ifdef FAKE_STAT struct stat buf; #endif @@ -55,8 +57,10 @@ int main (int argc, char **argv) { gettimeofday(&tv, NULL); printf("gettimeofday() : Current date and time: %s", ctime(&tv.tv_sec)); +#ifndef __APPLE__ clock_gettime(CLOCK_REALTIME, &ts); printf("clock_gettime(): Current date and time: %s", ctime(&ts.tv_sec)); +#endif #ifdef FAKE_STAT lstat(argv[0], &buf); |