]> Savannah Git Hosting - gnulib.git/commit
copy-file-range: work around Linux kernel bug
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Jan 2022 01:27:51 +0000 (17:27 -0800)
committerBruno Haible <bruno@clisp.org>
Wed, 31 Aug 2022 22:33:50 +0000 (00:33 +0200)
commitfa10fc68c60c14c64b30b0339a02f5947ef41888
tree6128aaa51ef1e2d21dcdc0b26c954262cac9b636
parent4d5ae6bb63689626a111ac9bbf3db51d6fff1186
copy-file-range: work around Linux kernel bug

This workaround is adapted from Coreutils.
* lib/copy-file-range.c [__linux__ && HAVE_COPY_FILE_RANGE]:
Include <sys/utsname.h>.
(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):
* modules/copy-file-range (configure.ac):
* modules/unistd (unistd.h):
Support replacement of copy_file_range.
* m4/copy-file-range.m4 (gl_FUNC_COPY_FILE_RANGE):
Define HAVE_COPY_FILE_RANGE if the system has copy_file_range,
and on Linux check whether the system’s is known to work.
ChangeLog
doc/glibc-functions/copy_file_range.texi
lib/copy-file-range.c
lib/unistd.in.h
m4/copy-file-range.m4
m4/unistd_h.m4
modules/copy-file-range
modules/unistd