Skip to content

Commit c3392d4

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

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

configure.ac

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -697,23 +697,17 @@ 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
715709
#else
716-
return 1;
710+
#error unsupported by the platform
717711
#endif
718712
}
719713
]])], [ac_cv_copy_file_range=yes], [ac_cv_copy_file_range=no])

0 commit comments

Comments
 (0)