From 9921f2b9a241750e4730fc7d486687c6a32779f4 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Wed, 10 Oct 2012 00:35:14 +0000 Subject: build: resolve compile abort in libxt_limit on RHEL5 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libxt_limit.c: In function 'print_rate': libxt_limit.c:124: error: 'INFINITY' undeclared (first use in this function) The default mode of glibc-2.15's sets "-D_POSIX_C_SOURCE=200809L", and therefore "-D_ISOC99_SOURCE". However, on þe olde RHEL 5's glibc-2.5, it only has "-D_POSIX_C_SOURCE=200112L". Explicitly draw in the definition of INFINITY by always defining _ISOC99_SOURCE. By doing this, we are moving off of the default set, so _BSD_SOURCE also needs to be explicitly set to get at IFNAMSIZ that is used in xt_hashlimit.h. Signed-off-by: Jan Engelhardt Signed-off-by: Pablo Neira Ayuso --- extensions/libxt_hashlimit.c | 2 ++ extensions/libxt_limit.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/extensions/libxt_hashlimit.c b/extensions/libxt_hashlimit.c index 831345b7..c5b8d779 100644 --- a/extensions/libxt_hashlimit.c +++ b/extensions/libxt_hashlimit.c @@ -10,6 +10,8 @@ * * Error corections by nmalykh@bilim.com (22.01.2005) */ +#define _BSD_SOURCE 1 +#define _ISOC99_SOURCE 1 #include #include #include diff --git a/extensions/libxt_limit.c b/extensions/libxt_limit.c index 023500cf..f75ef2f8 100644 --- a/extensions/libxt_limit.c +++ b/extensions/libxt_limit.c @@ -3,6 +3,8 @@ * Jérôme de Vivie * Hervé Eychenne */ +#define _BSD_SOURCE 1 +#define _ISOC99_SOURCE 1 #include #include #include -- cgit v1.2.3