iptables: Add limits.h to get INT_MIN, INT_MAX, ...
PATCH 1/1 iptables: Add limits.h to get INT_MIN, INT_MAX, ...
Fix build failure of iptables utilities on debian/ubuntu, maybe other distros. The values INT_MIN and INT_MAX are used by many filters and these are defined in limits.h
---
patch against current iptables.git
include/xtables.h.in +1 -0
@@ -8,6 +8,7 @@ #include <sys/socket.h> /* PF_* */ #include <sys/types.h> +#include <limits.h> #include <stdbool.h> #include <netinet/in.h> #include <net/if.h>
Signature · 1 line
1.5.6.3
Quoted 3 lines · Stephen Hemminger
Fix build failure of iptables utilities on debian/ubuntu, maybe other distros. The values
INT_MINandINT_MAXare used by many filters and these are defined inlimits.h
No this is not right IMO, limits.h should be included for the same reason you would not do that to kernel's .h files. Instead, limits.h should go in the .c files.
Quoted 9 lines · Jan Engelhardt
Quoted 3 lines · Stephen Hemminger
Fix build failure of iptables utilities on debian/ubuntu, maybe other distros. The values
INT_MINandINT_MAXare used by many filters and these are defined inlimits.hNo this is not right IMO,
limits.hshould be included for the same reason you would not do that to kernel's .h files. Instead,limits.hshould go in the .c files.
I wonder what debian has different in its Glibc files that limits.h is not included like it is for everybody else.
Anyway, of course it should be included where due. Gawd, that led me to have clean some unnecessary includes up beforehand, but oh well.
Could you try the "limits" branch of git://dev.medozas.de/iptables
if it compiles for you?
Jan
Quoted 11 lines · Jan Engelhardt
Quoted 7 lines · Jan Engelhardt
Quoted 3 lines · Stephen Hemminger
Fix build failure of iptables utilities on debian/ubuntu, maybe other distros. The values
INT_MINandINT_MAXare used by many filters and these are defined inlimits.hNo this is not right IMO,
limits.hshould be included for the same reason you would not do that to kernel's .h files. Instead,limits.hshould go in the .c files.I wonder what debian has different in its Glibc files that
limits.his not included like it is for everybody else.
It works fine for me on Debian.
Quoted 6 lines
Anyway, of course it should be included where due. Gawd, that led me to have clean some unnecessary includes up beforehand, but oh well.
Could you try the "limits" branch of
git://dev.medozas.de/iptables
if it compiles for you?
Unless Stephen has time to test this, I'll apply his patch. This doesn't seem worth loosing time over.
Quoted 4 lines · Patrick McHardy
Quoted 2 lines
I wonder what debian has different in its Glibc files that
limits.his not included like it is for everybody else.It works fine for me on Debian.
Debian Glibc 2.9_3 also has limits.h removed from bits/socket.h.
Quoted 6 lines
Quoted 2 lines
Could you try the "limits" branch of
git://dev.medozas.de/iptables
if it compiles for you?Unless Stephen has time to test this, I'll apply his patch. This doesn't seem worth loosing time over.
Please do.
Patrick McHardy
AppliedQuoted 5 lines · Jan Engelhardt
Quoted 3 lines · Patrick McHardy
Quoted 2 lines
I wonder what debian has different in its Glibc files that
limits.his not included like it is for everybody else.It works fine for me on Debian.
Quoted 8 lines
Debian Glibc 2.9_3 also has
limits.hremoved frombits/socket.h.Quoted 5 lines
Quoted 2 lines
Could you try the "limits" branch of
git://dev.medozas.de/iptables
if it compiles for you?Unless Stephen has time to test this, I'll apply his patch. This doesn't seem worth loosing time over.
Please do.
Applied, thanks.
Quoted 8 lines · Patrick McHardy
Quoted 7 lines · Jan Engelhardt
Quoted 3 lines · Patrick McHardy
Quoted 2 lines
I wonder what debian has different in its Glibc files that
limits.his not included like it is for everybody else.It works fine for me on Debian.
Debian Glibc 2.9_3 also has
limits.hremoved frombits/socket.h.
Quoted 9 lines
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Could you try the "limits" branch of
git://dev.medozas.de/iptables
if it compiles for you?Unless Stephen has time to test this, I'll apply his patch. This doesn't seem worth loosing time over.
Please do.
Applied, thanks.
Ah crap. I misread "his patch" as "this patch". If you could slurp in the branch anwyay you will get the header resync and fixing up other places where <limits.h> might suddenly be missing.
Please apply.