From fd6fbd3bdbd9999a4ca8813d14964b350a759914 Mon Sep 17 00:00:00 2001
From: Alberto Bertogli <albertito@blitiri.com.ar>
Date: Mon, 6 Jul 2009 11:59:55 -0300
Subject: [PATCH 07/74] 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 ++
 libjio/compat.h   |    1 +
 2 files changed, 3 insertions(+), 0 deletions(-)

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
-- 
1.6.2.2.646.gb214


