summaryrefslogtreecommitdiff
path: root/doc/glibc-functions
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 /doc/glibc-functions
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 'doc/glibc-functions')
-rw-r--r--doc/glibc-functions/copy_file_range.texi5
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/glibc-functions/copy_file_range.texi b/doc/glibc-functions/copy_file_range.texi
index baac6e1302..f10271c157 100644
--- a/doc/glibc-functions/copy_file_range.texi
+++ b/doc/glibc-functions/copy_file_range.texi
@@ -24,6 +24,11 @@ This function exists only on Linux and FreeBSD and is therefore
missing on many non-glibc platforms:
glibc 2.26, macOS 11.1, FreeBSD 12.0, NetBSD 9.0, OpenBSD 6.7, Minix 3.1.8, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.4, Cygwin 2.9, mingw, MSVC 14, Android 9.0.
But the replacement function is only a stub: It always fails with error ENOSYS.
+
+@item
+This function has many problems on Linux kernel versions before 5.3.
+On these kernel versions, the replacement function always fails with
+error ENOSYS.
@end itemize
Portability problems not fixed by Gnulib: