Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
@@ -304,6 +304,12 @@ AC_EGREP_CPP([yes],
AC_MSG_RESULT(no)
])
+dnl Check linux/fs.h for FICLONE to support BTRFS's file clone operation
+case $host_os in
+linux*)
+ AC_CHECK_HEADERS([linux/fs.h])
+esac
+
dnl Check if the OS is supported by the console saver.
cons_saver=""
case $host_os in
@@ -46,7 +46,9 @@
#include <stdlib.h>
#ifdef __linux__
+#ifdef HAVE_LINUX_FS_H
#include <linux/fs.h>
+#endif /* HAVE_LINUX_FS_H */
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
#endif /* HAVE_SYS_IOCTL_H */