Hash :
0ac98783
Author :
Date :
2022-01-14T17:27:51
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.
Description:
Copy parts of files
Files:
lib/copy-file-range.c
m4/copy-file-range.m4
Depends-on:
largefile
unistd
configure.ac:
gl_FUNC_COPY_FILE_RANGE
gl_CONDITIONAL([GL_COND_OBJ_COPY_FILE_RANGE],
[test $HAVE_COPY_FILE_RANGE = 0 ||
test $REPLACE_COPY_FILE_RANGE = 1])
gl_UNISTD_MODULE_INDICATOR([copy-file-range])
Makefile.am:
if GL_COND_OBJ_COPY_FILE_RANGE
lib_SOURCES += copy-file-range.c
endif
Include:
<unistd.h>
License:
LGPLv2+
Maintainer:
all