All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
@ 2009-02-21  0:28 Stephen Hemminger
  2009-02-21  1:25 ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Stephen Hemminger @ 2009-02-21  0:28 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: netfilter-devel

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

diff --git a/include/xtables.h.in b/include/xtables.h.in
index b5f1af2..e346778 100644
--- a/include/xtables.h.in
+++ b/include/xtables.h.in
@@ -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>
-- 
1.5.6.3


^ permalink raw reply related	[flat|nested] 7+ messages in thread

* Re: [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
  2009-02-21  0:28 [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, Stephen Hemminger
@ 2009-02-21  1:25 ` Jan Engelhardt
  2009-02-21  2:51   ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2009-02-21  1:25 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Patrick McHardy, netfilter-devel

On Saturday 2009-02-21 01:28, Stephen Hemminger wrote:

>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

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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
  2009-02-21  1:25 ` Jan Engelhardt
@ 2009-02-21  2:51   ` Jan Engelhardt
  2009-02-24 14:09     ` Patrick McHardy
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2009-02-21  2:51 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: Patrick McHardy, netfilter-devel


On Saturday 2009-02-21 02:25, Jan Engelhardt wrote:
>On Saturday 2009-02-21 01:28, Stephen Hemminger wrote:
>
>>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
>
>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.

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

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
  2009-02-21  2:51   ` Jan Engelhardt
@ 2009-02-24 14:09     ` Patrick McHardy
  2009-02-24 15:22       ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2009-02-24 14:09 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Stephen Hemminger, netfilter-devel

Jan Engelhardt wrote:
> On Saturday 2009-02-21 02:25, Jan Engelhardt wrote:
>> On Saturday 2009-02-21 01:28, Stephen Hemminger wrote:
>>
>>> 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
>> 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.
> 
> I wonder what debian has different in its Glibc files that
> limits.h is not included like it is for everybody else.

It works fine for me on Debian.

> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
  2009-02-24 14:09     ` Patrick McHardy
@ 2009-02-24 15:22       ` Jan Engelhardt
  2009-02-25  7:25         ` Patrick McHardy
  0 siblings, 1 reply; 7+ messages in thread
From: Jan Engelhardt @ 2009-02-24 15:22 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Stephen Hemminger, netfilter-devel


On Tuesday 2009-02-24 15:09, Patrick McHardy wrote:
>> I wonder what debian has different in its Glibc files that
>> limits.h is 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.

>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
  2009-02-24 15:22       ` Jan Engelhardt
@ 2009-02-25  7:25         ` Patrick McHardy
  2009-02-25 10:08           ` Jan Engelhardt
  0 siblings, 1 reply; 7+ messages in thread
From: Patrick McHardy @ 2009-02-25  7:25 UTC (permalink / raw)
  To: Jan Engelhardt; +Cc: Stephen Hemminger, netfilter-devel

Jan Engelhardt wrote:
> On Tuesday 2009-02-24 15:09, Patrick McHardy wrote:
>>> I wonder what debian has different in its Glibc files that
>>> limits.h is 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.
> 
>>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, ...
  2009-02-25  7:25         ` Patrick McHardy
@ 2009-02-25 10:08           ` Jan Engelhardt
  0 siblings, 0 replies; 7+ messages in thread
From: Jan Engelhardt @ 2009-02-25 10:08 UTC (permalink / raw)
  To: Patrick McHardy; +Cc: Stephen Hemminger, netfilter-devel


On Wednesday 2009-02-25 08:25, Patrick McHardy wrote:
> Jan Engelhardt wrote:
>> On Tuesday 2009-02-24 15:09, Patrick McHardy wrote:
>>>> I wonder what debian has different in its Glibc files that
>>>> limits.h is 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.
>>
>>>> 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.

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2009-02-25 10:08 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-21  0:28 [PATCH] iptables: Add limits.h to get INT_MIN, INT_MAX, Stephen Hemminger
2009-02-21  1:25 ` Jan Engelhardt
2009-02-21  2:51   ` Jan Engelhardt
2009-02-24 14:09     ` Patrick McHardy
2009-02-24 15:22       ` Jan Engelhardt
2009-02-25  7:25         ` Patrick McHardy
2009-02-25 10:08           ` Jan Engelhardt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.