logo

alpine-overlay

git clone https://anongit.hacktivis.me/git/alpine-overlay.git/

utils-std-0.0.3-getconf_use_correct_structs.patch (1267B)


  1. From c9e9194dd4ed1796f28c594bf27f75fbe7d1e9ea Mon Sep 17 00:00:00 2001
  2. From: "Haelwenn (lanodan) Monnier" <contact@hacktivis.me>
  3. Date: Mon, 14 Apr 2025 01:55:41 +0200
  4. Subject: [PATCH] cmd/getconf: use the correct structs in -a loops
  5. ---
  6. cmd/getconf.c | 8 ++++----
  7. 1 file changed, 4 insertions(+), 4 deletions(-)
  8. diff --git a/cmd/getconf.c b/cmd/getconf.c
  9. index 3baed4d..ebad913 100644
  10. --- a/cmd/getconf.c
  11. +++ b/cmd/getconf.c
  12. @@ -174,7 +174,7 @@ main(int argc, char *argv[])
  13. strerror(errno));
  14. return 1;
  15. }
  16. - if(ret == -1) ret = sysconf_vars[i].limit_h;
  17. + if(ret == -1) ret = pathconf_vars[i].limit_h;
  18. printf("%ld\n", ret);
  19. return 0;
  20. @@ -264,8 +264,8 @@ main(int argc, char *argv[])
  21. {
  22. fprintf(stderr,
  23. "getconf: error: sysconf(%d /* \"%s\" */): %s\n",
  24. - confstr_vars[i].value,
  25. - confstr_vars[i].name,
  26. + sysconf_vars[i].value,
  27. + sysconf_vars[i].name,
  28. strerror(errno));
  29. err = 1;
  30. continue;
  31. @@ -311,7 +311,7 @@ main(int argc, char *argv[])
  32. err = 1;
  33. continue;
  34. }
  35. - if(ret == -1) ret = sysconf_vars[i].limit_h;
  36. + if(ret == -1) ret = pathconf_vars[i].limit_h;
  37. printf("%s: %ld\n", pathconf_vars[i].name, ret);
  38. }
  39. --
  40. 2.49.0