git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8c6ca6e
)
libreplace: make a define for a best effort monotonic clock
author
Björn Jacke
<bj@sernet.de>
Thu, 26 Aug 2010 10:22:02 +0000
(12:22 +0200)
committer
Björn Jacke
<bj@sernet.de>
Tue, 31 Aug 2010 08:24:37 +0000
(10:24 +0200)
lib/replace/system/time.h
patch
|
blob
|
history
diff --git
a/lib/replace/system/time.h
b/lib/replace/system/time.h
index ff26531e45b8d4b179056e659799f8ceb25227e4..3605d2692e85a10dc53714be19e7966a982cb91e 100644
(file)
--- a/
lib/replace/system/time.h
+++ b/
lib/replace/system/time.h
@@
-67,9
+67,16
@@
int rep_utimes(const char *filename, const struct timeval tv[2]);
#endif
#ifndef HAVE_CLOCK_GETTIME
+/* CLOCK_REALTIME is required by POSIX */
#define CLOCK_REALTIME 0
typedef int clockid_t;
int rep_clock_gettime(clockid_t clk_id, struct timespec *tp);
#endif
+/* make sure we have a best effort CUSTOM_CLOCK_MONOTONIC we can rely on */
+#ifndef CLOCK_MONOTONIC
+#define CUSTOM_CLOCK_MONOTONIC CLOCK_REALTIME
+#else
+#define CUSTOM_CLOCK_MONOTONIC CLOCK_MONOTONIC
+#endif
#endif