45 lines
1.5 KiB
Diff
45 lines
1.5 KiB
Diff
From d12b017cddfeb9fe9920ba054ae3dfcb8e9238b8 Mon Sep 17 00:00:00 2001
|
|
From: Florian Weimer <[email protected]>
|
|
Date: Wed, 4 Mar 2026 18:32:36 +0100
|
|
Subject: [PATCH] Linux: Only define OPEN_TREE_* macros in <sys/mount.h> if
|
|
undefined (bug 33921)
|
|
|
|
There is a conditional inclusion of <linux/mount.h> earlier in the file.
|
|
If that defines the macros, do not redefine them. This addresses build
|
|
problems as the token sequence used by the UAPI macro definitions
|
|
changes between Linux versions.
|
|
|
|
Reviewed-by: Adhemerval Zanella <[email protected]>
|
|
---
|
|
sysdeps/unix/sysv/linux/sys/mount.h | 10 ++++++----
|
|
1 file changed, 6 insertions(+), 4 deletions(-)
|
|
|
|
diff --git a/sysdeps/unix/sysv/linux/sys/mount.h b/sysdeps/unix/sysv/linux/sys/mount.h
|
|
index 5e496caf2f..0c5ebed33a 100644
|
|
--- a/sysdeps/unix/sysv/linux/sys/mount.h
|
|
+++ b/sysdeps/unix/sysv/linux/sys/mount.h
|
|
@@ -264,14 +264,16 @@ enum fsconfig_command
|
|
#define FSOPEN_CLOEXEC 0x00000001
|
|
|
|
/* open_tree flags. */
|
|
-#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
|
+#ifndef OPEN_TREE_CLONE
|
|
+# define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
|
|
+#endif
|
|
#ifndef O_CLOEXEC
|
|
# include <bits/cloexec.h>
|
|
# define O_CLOEXEC __O_CLOEXEC
|
|
#endif
|
|
-#undef OPEN_TREE_CLOEXEC
|
|
-#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
|
|
-
|
|
+#ifndef OPEN_TREE_CLOEXEC
|
|
+# define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */
|
|
+#endif
|
|
|
|
__BEGIN_DECLS
|
|
|
|
--
|
|
2.43.7
|
|
|