]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add AT_HANDLE_FID from Linux 6.5 to bits/fcntl-linux.h
authorJoseph Myers <joseph@codesourcery.com>
Mon, 16 Oct 2023 13:18:51 +0000 (13:18 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 16 Oct 2023 13:18:51 +0000 (13:18 +0000)
Linux 6.5 adds a constant AT_HANDLE_FID; add it to glibc.  Because
this is a flag for the function name_to_handle_at declared in
bits/fcntl-linux.h, put the flag there rather than alongside other
AT_* flags in (OS-independent) fcntl.h.

Tested for x86_64.

sysdeps/unix/sysv/linux/bits/fcntl-linux.h

index df378c7b896efa398fd7c682b4f9c7943fef3736..dd9d9baf09726a30f1469c682a3984ccb5373e62 100644 (file)
@@ -368,6 +368,17 @@ struct file_handle
 # define MAX_HANDLE_SZ 128
 #endif
 
+#ifdef __USE_GNU
+/* Flags for name_to_handle_at.  See comment in fcntl.h about the use
+   of the same AT_* flag bits for different purposes in different
+   functions.  */
+# define AT_HANDLE_FID         AT_REMOVEDIR /* File handle is needed
+                                               to compare object
+                                               identity and may not
+                                               be usable to
+                                               open_by_handle_at.  */
+#endif
+
 __BEGIN_DECLS
 
 #ifdef __USE_GNU