git: bf4d2a45b991 - main - kern_descrip.c: further limit expression in Static_assert() to newer clang
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 13 Jul 2025 01:24:22 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=bf4d2a45b9913bbd4720423288f4bdb2f0afc970
commit bf4d2a45b9913bbd4720423288f4bdb2f0afc970
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2025-07-13 01:18:24 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2025-07-13 01:24:14 +0000
kern_descrip.c: further limit expression in Static_assert() to newer clang
Reported by: vexeduxr
Sponsored by: The FreeBSD Foundation
---
sys/kern/kern_descrip.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/kern/kern_descrip.c b/sys/kern/kern_descrip.c
index c4f5e586b0ed..a27ab33b34da 100644
--- a/sys/kern/kern_descrip.c
+++ b/sys/kern/kern_descrip.c
@@ -557,7 +557,7 @@ open_to_fde_flags(int open_flags, bool sticky_orb)
{ .f = O_CLOFORK, .t = UF_FOCLOSE },
{ .f = O_RESOLVE_BENEATH, .t = UF_RESOLVE_BENEATH },
};
-#ifdef __clang__
+#if defined(__clang__) && __clang_major__ >= 19
_Static_assert(open_to_fde_flags_s[nitems(open_to_fde_flags_s) - 1].f ==
O_RESOLVE_BENEATH, "O_RESOLVE_BENEATH must be last, for sticky_orb");
#endif