Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Pádraig Brady
On 16/01/2022 18:06, Paul Eggert wrote: On 1/16/22 05:37, Pádraig Brady wrote: This looks like the replacement will only be used when the build system uses an older kernel? If so this seems brittle. Consider the case where el7 rpms are being built on central build systems with newer kernels.

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Paul Eggert
On 1/16/22 05:37, Pádraig Brady wrote: This looks like the replacement will only be used when the build system uses an older kernel? If so this seems brittle. Consider the case where el7 rpms are being built on central build systems with newer kernels. It doesn't run any code on the newer

Re: [PATCH] copy-file-range: work around Linux kernel bug

2022-01-16 Thread Pádraig Brady
On 15/01/2022 01:33, Paul Eggert wrote: --- a/m4/copy-file-range.m4 +++ b/m4/copy-file-range.m4 @@ -7,6 +7,7 @@ dnl with or without modifications, as long as this notice is preserved. AC_DEFUN([gl_FUNC_COPY_FILE_RANGE], [ AC_REQUIRE([gl_UNISTD_H_DEFAULTS]) +

[PATCH] copy-file-range: work around Linux kernel bug

2022-01-14 Thread Paul Eggert
This workaround is adapted from Coreutils. * lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]: Include . (copy_file_range): Use a stub to replace the copy_file_range of Linux kernel versions 4.5 through 5.2. * lib/unistd.in.h (copy_file_range): * m4/unistd_h.m4 (gl_UNISTD_H_DEFAULTS): *