diff mbox series

microblaze: don't use copy_file_range syscall with kernel headers < 4.10

Message ID 20180128142122.5318-1-romain.naour@gmail.com
State New
Headers show
Series microblaze: don't use copy_file_range syscall with kernel headers < 4.10 | expand

Commit Message

Romain Naour Jan. 28, 2018, 2:21 p.m. UTC
copy_file_range syscall was added for microblaze in 4.10.

This patch makes the MicroBlaze kernel-features.h undefine
__ASSUME_COPY_FILE_RANGE for toolchains built with kernel headers < 4.10.

	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
	(__ASSUME_COPY_FILE_RANGE) [__LINUX_KERNEL_VERSION < 0x040A00]: Undef.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/commit/?id=7181e5590e5ba898804aef3ee6be7f27606e6f8b

Signed-off-by: Romain Naour <romain.naour@gmail.com>
---
For glibc 2.27
---
 ChangeLog                                            | 5 +++++
 sysdeps/unix/sysv/linux/microblaze/kernel-features.h | 5 +++++
 2 files changed, 10 insertions(+)

Comments

Joseph Myers Jan. 29, 2018, 4:13 p.m. UTC | #1
On Sun, 28 Jan 2018, Romain Naour wrote:

> copy_file_range syscall was added for microblaze in 4.10.
> 
> This patch makes the MicroBlaze kernel-features.h undefine
> __ASSUME_COPY_FILE_RANGE for toolchains built with kernel headers < 4.10.
> 
> 	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
> 	(__ASSUME_COPY_FILE_RANGE) [__LINUX_KERNEL_VERSION < 0x040A00]: Undef.

Thanks, committed.
diff mbox series

Patch

diff --git a/ChangeLog b/ChangeLog
index 5eebc649cc..21205f9d43 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@ 
+2018-01-28  Romain Naour  <romain.naour@gmail.com>  (tiny change)
+
+	* sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+	(__ASSUME_COPY_FILE_RANGE) [__LINUX_KERNEL_VERSION < 0x040A00]: Undef.
+
 2018-01-27  Samuel Thibault  <samuel.thibault@ens-lyon.org>
 
 	* sysdeps/mach/hurd/xmknodat.c: Include <sys/sysmacros.h>.
diff --git a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
index e0e6483c91..745f899911 100644
--- a/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
+++ b/sysdeps/unix/sysv/linux/microblaze/kernel-features.h
@@ -52,3 +52,8 @@ 
 #if __LINUX_KERNEL_VERSION < 0x040000
 # undef __ASSUME_EXECVEAT
 #endif
+
+/* Support for the copy_file_range syscall was added in 4.10.  */
+#if __LINUX_KERNEL_VERSION < 0x040A00
+# undef __ASSUME_COPY_FILE_RANGE
+#endif