Skip to content

Fix error: static declaration of copy_file_range follows non-static d… - #22914

Open
remicollet wants to merge 1 commit into
php:masterfrom
remicollet:issue-copyfilerange
Open

Fix error: static declaration of copy_file_range follows non-static d…#22914
remicollet wants to merge 1 commit into
php:masterfrom
remicollet:issue-copyfilerange

Conversation

@remicollet

Copy link
Copy Markdown
Member

On RHEL-8 where copy_file_range exists but kernel is too old

/builddir/build/BUILD/php-8.6.0alpha3/main/io/php_io_copy_linux.c:24:23: error: static declaration of 'copy_file_range' follows non-static declaration
 static inline ssize_t copy_file_range(
                       ^~~~~~~~~~~~~~~
In file included from /builddir/build/BUILD/php-8.6.0alpha3/Zend/zend_hrtime.h:23,
                 from /builddir/build/BUILD/php-8.6.0alpha3/Zend/zend_gc.h:22,
                 from /builddir/build/BUILD/php-8.6.0alpha3/Zend/zend_string.h:22,
                 from /builddir/build/BUILD/php-8.6.0alpha3/Zend/zend.h:31,
                 from /builddir/build/BUILD/php-8.6.0alpha3/main/php.h:28,
                 from /builddir/build/BUILD/php-8.6.0alpha3/main/php_io.h:20,
                 from /builddir/build/BUILD/php-8.6.0alpha3/main/io/php_io_internal.h:18,
                 from /builddir/build/BUILD/php-8.6.0alpha3/main/io/php_io_copy_linux.c:17:
/usr/include/unistd.h:1107:9: note: previous declaration of 'copy_file_range' was here
 ssize_t copy_file_range (int __infd, __off64_t *__pinoff,
         ^~~~~~~~~~~~~~~

@remicollet
remicollet requested a review from bukka as a code owner July 29, 2026 05:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants