Skip to content

Commit fc97cf5

Browse files
committed
switching checks handling
1 parent 418e0fc commit fc97cf5

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

configure.ac

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -697,25 +697,19 @@ AC_CACHE_CHECK([for copy_file_range], ac_cv_copy_file_range,
697697
#define _GNU_SOURCE
698698
#endif
699699
#include <linux/version.h>
700-
#elif defined(__FreeBSD__)
701-
// TODO checks kernel version once this syscall is fixed on FreeBSD
702-
#include <sys/param.h>
703-
#include <sys/types.h>
704-
#endif
705700
#include <unistd.h>
706701
707702
int main(void) {
708703
(void)copy_file_range(-1, 0, -1, 0, 0, 0);
709-
#if defined(__linux__)
710704
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
711-
return 1;
705+
#error kernel too old;
712706
#else
713707
return 0;
714708
#endif
709+
}
715710
#else
716-
return 1;
711+
#error unsupported platform
717712
#endif
718-
}
719713
]])], [ac_cv_copy_file_range=yes], [ac_cv_copy_file_range=no])
720714
])
721715

0 commit comments

Comments
 (0)