[php-src] master: Fix error: static declaration of copy_file_range follows non-static declaration

Remi Collet <[email protected]> Thu, 30 Jul 2026 05:51:59 +0000
Newsgroups gmane.comp.php.cvs.general
Message-ID <[email protected]>
Author: Remi Collet (remicollet)
Date: 2026-07-30T07:51:49+02:00

Commit: https://github.com/php/php-src/commit/774e5b6455dd188cfd654368c8fc4e5171f54295
Raw diff: https://github.com/php/php-src/commit/774e5b6455dd188cfd654368c8fc4e5171f54295.diff

Fix error: static declaration of copy_file_range follows non-static declaration

Changed paths:
  M  main/io/php_io_copy_linux.c


Diff:

diff --git a/main/io/php_io_copy_linux.c b/main/io/php_io_copy_linux.c
index af92b14a64d3..e5d7ecb1b721 100644
--- a/main/io/php_io_copy_linux.c
+++ b/main/io/php_io_copy_linux.c
@@ -21,11 +21,12 @@
 
 #if !defined(HAVE_COPY_FILE_RANGE) && defined(__NR_copy_file_range)
 #define HAVE_COPY_FILE_RANGE 1
-static inline ssize_t copy_file_range(
+static inline ssize_t php_copy_file_range(
 		int fd_in, off_t *off_in, int fd_out, off_t *off_out, size_t len, unsigned int flags)
 {
 	return syscall(__NR_copy_file_range, fd_in, off_in, fd_out, off_out, len, flags);
 }
+#define copy_file_range php_copy_file_range
 #endif
 
 #ifdef HAVE_SENDFILE