#ifdef AIO
#include <libaio.h>
#endif
-#ifdef FALLOCATE
-#include <linux/falloc.h>
-#endif
#ifndef MAP_FILE
# define MAP_FILE 0
}
#endif
-#ifdef FALLOCATE
+#ifdef HAVE_LINUX_FALLOC_H
/* fallocate is basically a no-op unless extending, then a lot like a truncate */
void
do_preallocate(unsigned offset, unsigned length)
" -A: Use the AIO system calls\n"
#endif
" -D startingop: debug output starting at specified operation\n"
-#ifdef FALLOCATE
+#ifdef HAVE_LINUX_FALLOC_H
" -F: Do not use fallocate (preallocation) calls\n"
#endif
#ifdef FALLOC_FL_PUNCH_HOLE
void
test_fallocate()
{
-#ifdef FALLOCATE
+#ifdef HAVE_LINUX_FALLOC_H
if (!lite && fallocate_calls) {
if (fallocate(fd, 0, 0, 1) && errno == EOPNOTSUPP) {
if(!quiet)
ftruncate(fd, 0);
}
}
-#else /* ! FALLOCATE */
+#else /* ! HAVE_LINUX_FALLOC_H */
fallocate_calls = 0;
#endif