]> 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)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 15 Jan 2022 01:32:43 +0000 (17:32 -0800)
commit0ac98783691bbf8212537ebe18ddb68feb22a760
treee5482d6aa1edeaf14be664c4e1386f116d905e59
parent1a4a0680c84b5a726c8b38c22aa68a049865fa31
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