sync engine: add support for pwritev/preadv
[fio.git] / configure
index 5939bed7fec6316bc9c2b22cda6cd3ce364fdf63..95765cceffac57a203855a46941e6daa23d26482 100755 (executable)
--- a/configure
+++ b/configure
@@ -1066,6 +1066,23 @@ if compile_prog "" "" "RLIMIT_MEMLOCK"; then
 fi
 echo "RLIMIT_MEMLOCK                $rlimit_memlock"
 
+##########################################
+# Check whether we have pwritev/preadv
+pwritev="no"
+cat > $TMPC << EOF
+#include <stdio.h>
+#include <sys/uio.h>
+int main(int argc, char **argv)
+{
+  return pwritev(0, NULL, 1, 0) + preadv(0, NULL, 1, 0);
+}
+EOF
+if compile_prog "" "" "pwritev"; then
+  pwritev="yes"
+fi
+echo "pwritev/preadv                $pwritev"
+
+
 #############################################################################
 
 if test "$wordsize" = "64" ; then
@@ -1181,6 +1198,9 @@ fi
 if test "$rlimit_memlock" = "yes" ; then
   output_sym "CONFIG_RLIMIT_MEMLOCK"
 fi
+if test "$pwritev" = "yes" ; then
+  output_sym "CONFIG_PWRITEV"
+fi
 
 echo "LIBS+=$LIBS" >> $config_host_mak
 echo "CFLAGS+=$CFLAGS" >> $config_host_mak