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