git » libjio » commit 3fcd72c

libjio: Add missing #include

author Alberto Bertogli
2009-06-26 04:33:22 UTC
committer Alberto Bertogli
2009-06-26 04:33:22 UTC
parent 9979a6241770834a1df82308a413cc425f0dd02b

libjio: Add missing #include

It's incorrect to assume fcntl.h provides off_t and size_t, we need to
include sys/types.h for those.

Reported by Jonathan Yu.

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

libjio/compat.c +1 -0
libjio/compat.h +3 -0

diff --git a/libjio/compat.c b/libjio/compat.c
index 8c7645b..7ea1b2f 100644
--- a/libjio/compat.c
+++ b/libjio/compat.c
@@ -11,6 +11,7 @@
 #endif
 
 #include <fcntl.h>		/* sync_range_submit(), if possible */
+#include <sys/types.h>		/* off_t, size_t */
 #include "compat.h"
 
 
diff --git a/libjio/compat.h b/libjio/compat.h
index cf90798..517af33 100644
--- a/libjio/compat.h
+++ b/libjio/compat.h
@@ -4,6 +4,9 @@
 #ifndef _COMPAT_H
 #define _COMPAT_H
 
+#include <sys/types.h>		/* off_t, size_t */
+
+
 /* sync_file_range() is linux-specific, so we provide an internal similar API,
  * with a constant to be able to check for its presence; the implementation is
  * in compat.c */