summaryrefslogtreecommitdiff
path: root/modules/unistd
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-01-14 17:27:51 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-01-14 17:32:43 -0800
commit0ac98783691bbf8212537ebe18ddb68feb22a760 (patch)
treee5482d6aa1edeaf14be664c4e1386f116d905e59 /modules/unistd
parent1a4a0680c84b5a726c8b38c22aa68a049865fa31 (diff)
downloadgnulib-0ac98783691bbf8212537ebe18ddb68feb22a760.tar.gz
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.
Diffstat (limited to 'modules/unistd')
-rw-r--r--modules/unistd1
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/unistd b/modules/unistd
index 326bae0e48..01da57e23a 100644
--- a/modules/unistd
+++ b/modules/unistd
@@ -176,6 +176,7 @@ unistd.h: unistd.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(ARG_NONNULL_H
sed -e 's|@''REPLACE_ACCESS''@|$(REPLACE_ACCESS)|g' \
-e 's|@''REPLACE_CHOWN''@|$(REPLACE_CHOWN)|g' \
-e 's|@''REPLACE_CLOSE''@|$(REPLACE_CLOSE)|g' \
+ -e 's|@''REPLACE_COPY_FILE_RANGE''@|$(REPLACE_COPY_FILE_RANGE)|g' \
-e 's|@''REPLACE_DUP''@|$(REPLACE_DUP)|g' \
-e 's|@''REPLACE_DUP2''@|$(REPLACE_DUP2)|g' \
-e 's|@''REPLACE_EXECL''@|$(REPLACE_EXECL)|g' \