fs: use preadv on Linux if available

This commit is contained in:
Brian White 2014-02-26 04:49:26 -05:00 committed by Saúl Ibarra Corretgé
parent 515be33909
commit 269ff0beae

View File

@ -49,6 +49,18 @@
defined(__OpenBSD__) || \
defined(__NetBSD__)
# define HAVE_PREADV 1
#elif defined(__linux__)
# include <linux/version.h>
# if defined(__GLIBC_PREREQ)
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,30) && \
__GLIBC_PREREQ(2,10)
# define HAVE_PREADV 1
# else
# define HAVE_PREADV 0
# endif
# else
# define HAVE_PREADV 0
# endif
#else
# define HAVE_PREADV 0
#endif