git: d7214577ff00 - main - rtld: make it easier to add sparce non-default members to ld_env_var_desc
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 07 Nov 2024 05:20:34 UTC
The branch main has been updated by kib:
URL: https://cgit.FreeBSD.org/src/commit/?id=d7214577ff00221ac84a85e61794a5e126b952dd
commit d7214577ff00221ac84a85e61794a5e126b952dd
Author: Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-11-01 19:20:17 +0000
Commit: Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-11-07 05:14:38 +0000
rtld: make it easier to add sparce non-default members to ld_env_var_desc
by making the LD_ENV_DESC() macro variadic.
Suggested by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 1 week
Differential revision: https://reviews.freebsd.org/D47351
---
libexec/rtld-elf/rtld.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index c670ec7f0009..7c61fec44ef7 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -348,8 +348,11 @@ struct ld_env_var_desc {
const char *val;
const bool unsecure:1;
};
-#define LD_ENV_DESC(var, unsec) \
- [LD_##var] = { .n = #var, .unsecure = unsec }
+#define LD_ENV_DESC(var, unsec, ...) \
+ [LD_##var] = { \
+ .n = #var, \
+ .unsecure = unsec, \
+ __VA_ARGS__ \
static struct ld_env_var_desc ld_env_vars[] = {
LD_ENV_DESC(BIND_NOW, false),