Linux: Fix enum fsconfig_command detection in <sys/mount.h>

The #ifdef FSOPEN_CLOEXEC check did not work because the macro
was always defined in this header prior to the check, so that
the <linux/mount.h> contents did not matter.

Fixes commit 774058d729
("linux: Fix sys/mount.h usage with kernel headers").

(cherry picked from commit 2955ef4b7c)
This commit is contained in:
Florian Weimer 2022-08-16 09:25:23 +02:00 committed by Adhemerval Zanella
parent bb1e8b0ca9
commit 3bd3c612e9

View File

@ -188,9 +188,6 @@ enum
};
/* fsopen flags. */
#define FSOPEN_CLOEXEC 0x00000001
/* fsmount flags. */
#define FSMOUNT_CLOEXEC 0x00000001
@ -261,6 +258,9 @@ enum fsconfig_command
};
#endif
/* fsopen flags. */
#define FSOPEN_CLOEXEC 0x00000001
/* open_tree flags. */
#define OPEN_TREE_CLONE 1 /* Clone the target tree and attach the clone */
#define OPEN_TREE_CLOEXEC O_CLOEXEC /* Close the file on execve() */