diff options
author | Eric Wong <normalperson@yhbt.net> | 2011-01-14 17:26:59 +0000 |
---|---|---|
committer | Eric Wong <normalperson@yhbt.net> | 2011-01-14 17:26:59 +0000 |
commit | b48017f818e13f8c7ddb555f8fe5fa895521af7a (patch) | |
tree | 63ab6beb1dd9050a7ac3997cb1a73a331c51b1e5 /ext/clogger_ext/clogger.c | |
parent | cc43cfbb418ab7b4b2786123d33ede23b3cb5ea3 (diff) | |
download | clogger-b48017f818e13f8c7ddb555f8fe5fa895521af7a.tar.gz |
Fix a reversed typedef and also deal with the case where CLOCK_MONOTONIC is a function call and not a constant macro.
Diffstat (limited to 'ext/clogger_ext/clogger.c')
-rw-r--r-- | ext/clogger_ext/clogger.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/clogger_ext/clogger.c b/ext/clogger_ext/clogger.c index 604b9b6..d96b046 100644 --- a/ext/clogger_ext/clogger.c +++ b/ext/clogger_ext/clogger.c @@ -25,12 +25,14 @@ * since we could've been built on a different system than we're run * under. */ -static clockid_t hopefully_CLOCK_MONOTONIC = CLOCK_MONOTONIC; +static clockid_t hopefully_CLOCK_MONOTONIC; static void check_clock(void) { struct timespec now; + hopefully_CLOCK_MONOTONIC = CLOCK_MONOTONIC; + /* we can't check this reliably at compile time */ if (clock_gettime(CLOCK_MONOTONIC, &now) == 0) return; |