git: db21e6980b92 - stable/14 - rtld: make it easier to add sparce non-default members to ld_env_var_desc

From: Konstantin Belousov <kib_at_FreeBSD.org>
Date: Thu, 14 Nov 2024 00:43:06 UTC
The branch stable/14 has been updated by kib:

URL: https://cgit.FreeBSD.org/src/commit/?id=db21e6980b92140e044d1eaf5b86971e49b1574d

commit db21e6980b92140e044d1eaf5b86971e49b1574d
Author:     Konstantin Belousov <kib@FreeBSD.org>
AuthorDate: 2024-11-01 19:20:17 +0000
Commit:     Konstantin Belousov <kib@FreeBSD.org>
CommitDate: 2024-11-14 00:42:17 +0000

    rtld: make it easier to add sparce non-default members to ld_env_var_desc
    
    (cherry picked from commit d7214577ff00221ac84a85e61794a5e126b952dd)
---
 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 9e0c3b92848e..41d11adacb09 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -349,8 +349,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),