summaryrefslogtreecommitdiffstats
path: root/configure
diff options
context:
space:
mode:
authorPeter Maydell2011-01-06 12:05:10 +0100
committerRiku Voipio2011-01-07 16:13:22 +0100
commitc727f47d59641c43ce171126232fd8049296adf6 (patch)
treefce1c2a0ebc893077b5ac9ca851d2f31f1f0566c /configure
parentcris: Avoid useless tmp in t_gen_cc_jmp() (diff)
downloadqemu-c727f47d59641c43ce171126232fd8049296adf6.tar.gz
qemu-c727f47d59641c43ce171126232fd8049296adf6.tar.xz
qemu-c727f47d59641c43ce171126232fd8049296adf6.zip
linux-user: Implement sync_file_range{,2} syscalls
Implement the missing syscalls sync_file_range and sync_file_range2. The latter in particular is used by newer versions of apt on Ubuntu for ARM. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Signed-off-by: Riku Voipio <riku.voipio@iki.fi>
Diffstat (limited to 'configure')
-rwxr-xr-xconfigure18
1 files changed, 18 insertions, 0 deletions
diff --git a/configure b/configure
index 47e4cf04c0..831a741c74 100755
--- a/configure
+++ b/configure
@@ -2075,6 +2075,21 @@ if compile_prog "$ARCH_CFLAGS" "" ; then
fallocate=yes
fi
+# check for sync_file_range
+sync_file_range=no
+cat > $TMPC << EOF
+#include <fcntl.h>
+
+int main(void)
+{
+ sync_file_range(0, 0, 0, 0);
+ return 0;
+}
+EOF
+if compile_prog "$ARCH_CFLAGS" "" ; then
+ sync_file_range=yes
+fi
+
# check for dup3
dup3=no
cat > $TMPC << EOF
@@ -2613,6 +2628,9 @@ fi
if test "$fallocate" = "yes" ; then
echo "CONFIG_FALLOCATE=y" >> $config_host_mak
fi
+if test "$sync_file_range" = "yes" ; then
+ echo "CONFIG_SYNC_FILE_RANGE=y" >> $config_host_mak
+fi
if test "$dup3" = "yes" ; then
echo "CONFIG_DUP3=y" >> $config_host_mak
fi