This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Add renameat2 function [BZ #17662]
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Florian Weimer <fweimer at redhat dot com>
- Cc: <libc-alpha at sourceware dot org>
- Date: Sat, 30 Jun 2018 20:21:59 +0000
- Subject: Re: [PATCH] Add renameat2 function [BZ #17662]
- References: <20180630121447.E4C8643994575@oldenburg.str.redhat.com>
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