[PATCH] Add renameat2 function [BZ #17662]
Joseph Myers
joseph@codesourcery.com
Sat Jun 30 20:22:00 GMT 2018
On Sat, 30 Jun 2018, Florian Weimer wrote:
> diff --git a/sysdeps/unix/sysv/linux/kernel-features.h b/sysdeps/unix/sysv/linux/kernel-features.h
> index b90ea30195..ab42c5845a 100644
> --- a/sysdeps/unix/sysv/linux/kernel-features.h
> +++ b/sysdeps/unix/sysv/linux/kernel-features.h
> @@ -144,3 +144,8 @@
> */
>
> #define __ASSUME_CLONE_DEFAULT 1
> +
> +/* Support for the renameat2 system call was added in kernel 3.15. */
> +#if __LINUX_KERNEL_VERSION >= 0x030F00
> +# define __ASSUME_RENAMEAT2
> +#endif
But for sparc in 3.16, alpha and microblaze in 3.17 and sh in 4.8. So
those need conditional #undefs in their kernel-features.h files.
(Generically when adding __ASSUME_*, or when later removing such
__ASSUME_* that should apparently be unconditional based on the minimum
supported kernel, you need to watch out for such cases of some
architectures having got a syscall later than others.)
--
Joseph S. Myers
joseph@codesourcery.com
More information about the Libc-alpha
mailing list