utils-std-0.0.3-getconf_use_correct_structs.patch (1267B)
- From c9e9194dd4ed1796f28c594bf27f75fbe7d1e9ea Mon Sep 17 00:00:00 2001
- From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
- Date: Mon, 14 Apr 2025 01:55:41 +0200
- Subject: [PATCH] cmd/getconf: use the correct structs in -a loops
- ---
- cmd/getconf.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
- diff --git a/cmd/getconf.c b/cmd/getconf.c
- index 3baed4d..ebad913 100644
- --- a/cmd/getconf.c
- +++ b/cmd/getconf.c
- @@ -174,7 +174,7 @@ main(int argc, char *argv[])
- strerror(errno));
- return 1;
- }
- - if(ret == -1) ret = sysconf_vars[i].limit_h;
- + if(ret == -1) ret = pathconf_vars[i].limit_h;
- printf("%ld\n", ret);
- return 0;
- @@ -264,8 +264,8 @@ main(int argc, char *argv[])
- {
- fprintf(stderr,
- "getconf: error: sysconf(%d /* \"%s\" */): %s\n",
- - confstr_vars[i].value,
- - confstr_vars[i].name,
- + sysconf_vars[i].value,
- + sysconf_vars[i].name,
- strerror(errno));
- err = 1;
- continue;
- @@ -311,7 +311,7 @@ main(int argc, char *argv[])
- err = 1;
- continue;
- }
- - if(ret == -1) ret = sysconf_vars[i].limit_h;
- + if(ret == -1) ret = pathconf_vars[i].limit_h;
- printf("%s: %ld\n", pathconf_vars[i].name, ret);
- }
- --
- 2.49.0