aboutsummaryrefslogtreecommitdiff
path: root/emu/Android/compat/sync_file_range.c
diff options
context:
space:
mode:
authorbhgv <bhgv.empire@gmail.com>2018-03-01 16:54:45 +0200
committerbhgv <bhgv.empire@gmail.com>2018-03-01 16:54:45 +0200
commitb786f20bbab5a59046aa78a2c6c2a11536497202 (patch)
tree0851ecdec889eb9b7ba3751cc04d4f0b474e4a9e /emu/Android/compat/sync_file_range.c
inferno-os tree was separated from the inferno-os-android (separated from the Android driver)
Diffstat (limited to 'emu/Android/compat/sync_file_range.c')
-rw-r--r--emu/Android/compat/sync_file_range.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/emu/Android/compat/sync_file_range.c b/emu/Android/compat/sync_file_range.c
new file mode 100644
index 0000000..ff97827
--- /dev/null
+++ b/emu/Android/compat/sync_file_range.c
@@ -0,0 +1,17 @@
+/*
+ * sync_file_range.c - provide the sync_file_range IPC system call
+ * since bionic doesn't supply this function
+ */
+
+#define _GNU_SOURCE
+#include <sys/types.h>
+#include <sys/syscall.h>
+#include <sys/glibc-syscalls.h>
+#include <unistd.h>
+#include "android_compat.h"
+
+int sync_file_range(int fd, off64_t offset, off64_t nbytes,
+ unsigned int flags)
+{
+ return syscall(SYS_sync_file_range, fd, offset, nbytes, flags);
+}