@@ -664,28 +664,25 @@ AS_VAR_IF([php_cv_func_getaddrinfo], [yes],
664
664
dnl on FreeBSD, copy_file_range() works only with the undocumented flag 0x01000000;
665
665
dnl until the problem is fixed properly, copy_file_range() is used only on Linux
666
666
AC_CACHE_CHECK ( [ for copy_file_range] , [ php_cv_func_copy_file_range] ,
667
- [ AC_RUN_IFELSE ( [ AC_LANG_SOURCE ( [
668
- #ifdef __linux__
667
+ [ AC_COMPILE_IFELSE ( [ AC_LANG_SOURCE ( [
668
+ #ifndef __linux__
669
+ # error "unsupported platform"
670
+ #endif
669
671
#ifndef _GNU_SOURCE
670
- #define _GNU_SOURCE
672
+ # define _GNU_SOURCE
671
673
#endif
672
674
#include <linux/version.h>
673
- #include <unistd.h>
674
-
675
- int main(void) {
676
- (void)copy_file_range(-1, 0, -1, 0, 0, 0);
677
675
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,3,0)
678
- #error "kernel too old"
679
- #else
680
- return 0;
676
+ # error "kernel too old"
681
677
#endif
678
+ #include <unistd.h>
679
+ int main(void)
680
+ {
681
+ (void)copy_file_range(-1, 0, -1, 0, 0, 0);
682
+ return 0;
682
683
}
683
- #else
684
- #error "unsupported platform"
685
- #endif
686
684
] ) ] ,
687
685
[ php_cv_func_copy_file_range=yes] ,
688
- [ php_cv_func_copy_file_range=no] ,
689
686
[ php_cv_func_copy_file_range=no] )
690
687
] )
691
688
AS_VAR_IF ( [ php_cv_func_copy_file_range] , [ yes] ,
0 commit comments