git » libjio » commit fd6fbd3

libjio: Add missing clock_gettime() prototype in compat.h

author Alberto Bertogli
2009-07-06 14:59:55 UTC
committer Alberto Bertogli
2009-07-06 15:02:50 UTC
parent 4c83349e5a1724ebe21a024c06b5e0b409d31ef3

libjio: Add missing clock_gettime() prototype in compat.h

On platforms without clock_gettime(), we provide a stub. However, its
prototype was missing from the header, and it was also not included from
autosync.c (its only user so far).

This patch fixes that by adding the missing prototype and #include line.

Signed-off-by: Alberto Bertogli <albertito@blitiri.com.ar>

libjio/autosync.c +2 -0
libjio/compat.h +1 -0

diff --git a/libjio/autosync.c b/libjio/autosync.c
index edc6ec3..ad8b48c 100644
--- a/libjio/autosync.c
+++ b/libjio/autosync.c
@@ -11,6 +11,8 @@
 
 #include "common.h"
 #include "libjio.h"
+#include "compat.h"
+
 
 /** Configuration of an autosync thread */
 struct autosync_cfg {
diff --git a/libjio/compat.h b/libjio/compat.h
index cceeb29..ecfd9ff 100644
--- a/libjio/compat.h
+++ b/libjio/compat.h
@@ -45,6 +45,7 @@ int fdatasync(int fd);
 #ifndef CLOCK_REALTIME
 #define LACK_CLOCK_GETTIME 1
 #define CLOCK_REALTIME 0
+int clock_gettime(int clk_id, struct timespec *tp);
 #endif
 
 #endif