0001-include-limits.h.patch 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. From a0374d946e55129b36ba1e0024e1d94675a8f044 Mon Sep 17 00:00:00 2001
  2. From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  3. Date: Sun, 17 Sep 2023 22:01:21 +0200
  4. Subject: [PATCH] include limits.h
  5. Include limits.h to avoid the following build failure:
  6. poundctl.c: In function 'oi_getn':
  7. poundctl.c:232:29: error: 'INT_MAX' undeclared (first use in this function)
  8. 232 | if (errno || n < 0 || n > INT_MAX)
  9. | ^~~~~~~
  10. Fixes:
  11. - http://autobuild.buildroot.org/results/4edfffcd5d4383c57947d97139331e0bf2cb6155
  12. Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
  13. Upstream: https://github.com/graygnuorg/pound/pull/17
  14. ---
  15. src/config.c | 1 +
  16. src/poundctl.c | 1 +
  17. src/svc.c | 1 +
  18. src/tmpl.c | 1 +
  19. 4 files changed, 4 insertions(+)
  20. diff --git a/src/config.c b/src/config.c
  21. index b7e3150..12f5cfa 100644
  22. --- a/src/config.c
  23. +++ b/src/config.c
  24. @@ -21,6 +21,7 @@
  25. #include "extern.h"
  26. #include <openssl/x509v3.h>
  27. #include <assert.h>
  28. +#include <limits.h>
  29. /*
  30. diff --git a/src/poundctl.c b/src/poundctl.c
  31. index bd1459f..7fa18c8 100644
  32. --- a/src/poundctl.c
  33. +++ b/src/poundctl.c
  34. @@ -19,6 +19,7 @@
  35. #include "pound.h"
  36. #include "json.h"
  37. #include <assert.h>
  38. +#include <limits.h>
  39. char *conf_name = POUND_CONF;
  40. char *socket_name;
  41. diff --git a/src/svc.c b/src/svc.c
  42. index 6e810a6..457f1e0 100644
  43. --- a/src/svc.c
  44. +++ b/src/svc.c
  45. @@ -20,6 +20,7 @@
  46. #include "pound.h"
  47. #include "extern.h"
  48. #include "json.h"
  49. +#include <limits.h>
  50. /*
  51. * basic hashing function, based on fmv
  52. diff --git a/src/tmpl.c b/src/tmpl.c
  53. index 2efa72f..0e5b65d 100644
  54. --- a/src/tmpl.c
  55. +++ b/src/tmpl.c
  56. @@ -26,6 +26,7 @@
  57. #include "pound.h"
  58. #include <assert.h>
  59. +#include <limits.h>
  60. #include "json.h"
  61. static void
  62. --
  63. 2.40.1