summaryrefslogtreecommitdiff
path: root/gio/gfile.c
diff options
context:
space:
mode:
Diffstat (limited to 'gio/gfile.c')
-rw-r--r--gio/gfile.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gio/gfile.c b/gio/gfile.c
index 31da0b05e..a78737773 100644
--- a/gio/gfile.c
+++ b/gio/gfile.c
@@ -77,6 +77,13 @@
#include "gioerror.h"
#include "glibintl.h"
+/* Linux defines loff_t as a way to simplify the offset types for calls like
+ * splice() and copy_file_range(). BSD has copy_file_range() but doesn’t define
+ * loff_t. Abstract that. */
+#ifndef HAVE_LOFF_T
+typedef off_t loff_t;
+#endif
+
/**
* SECTION:gfile