Skip to contentSkip to conversation

iptables/extensions/libipt_time.c missing include

DISCUSSION [email protected] 4 participants 6 messages Jan 23, 2004 – Jan 27, 2004 1 message not in the archive netfilter

lore
Share & tools
lore
#0 lore raw

Hi,

Tell me if I'm wrong, it seems an include is missing in extensions/libipt_time.c from iptables cvs. (line 302 : offsetof)

--- extensions/libipt_time.c.ancien 2004-01-23 02:59:59.000000000

    +0100

+++ extensions/libipt_time.c 2004-01-23 02:54:17.000000000 +0100
@@ -3,6 +3,7 @@
#include <netdb.h>
#include <string.h>
#include <stdlib.h>
+#include <linux/stddef.h>
#include <getopt.h>

#include <iptables.h>

Signature · 1 line
Laurent
#1 lore raw
Quoted 3 lines · On Fri, Jan 23, 2004 at 03:06:45AM +0100, [email protected] wrote:

Tell me if I'm wrong, it seems an include is missing in extensions/libipt_time.c from iptables cvs. (line 302 : offsetof)

You should use <stddef.h> instead of <linux/stddef.h>.

Bastian

Signature · 3 lines
	"... freedom ... is a worship word..."
	"It is our worship word too."
		-- Cloud William and Kirk, "The Omega Glory", stardate unknown
#2 lore raw
Quoted 6 lines · Bastian Blank
Quoted 3 lines · On Fri, Jan 23, 2004 at 03:06:45AM +0100, [email protected] wrote:

Tell me if I'm wrong, it seems an include is missing in extensions/libipt_time.c from iptables cvs. (line 302 : offsetof)

You should use <stddef.h> instead of <linux/stddef.h>.

At least on my debian machines /usr/include/stddef.h doesn't exist.

Thus, I'm accepting the patch.

Quoted 1 line

Bastian

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#3 lore raw
Quoted 2 lines · Harald Welte
Quoted 1 line

You should use <stddef.h> instead of <linux/stddef.h>.

At least on my debian machines /usr/include/stddef.h doesn't exist.

It don't exists there, because it is shipped with the gcc.

Bastian

Signature · 1 line
Phasers locked on target, Captain.

A message that is not in the archive (sent off-list or not yet received): [email protected]

#5 lore raw
Quoted 4 lines · Henrik Nordstrom
Quoted 1 line

At least on my debian machines /usr/include/stddef.h doesn't exist.

There should be one in your gcc include directory. It is a compiler dependent include, not a system dependent one.

stupid me, thanks.

Quoted 2 lines

Regards
Henrik

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie
#6 lore raw
In reply to Harald Welte
Quoted 11 lines · Harald Welte
Quoted 6 lines · Bastian Blank
Quoted 3 lines · On Fri, Jan 23, 2004 at 03:06:45AM +0100, [email protected] wrote:

Tell me if I'm wrong, it seems an include is missing in extensions/libipt_time.c from iptables cvs. (line 302 : offsetof)

You should use <stddef.h> instead of <linux/stddef.h>.

At least on my debian machines /usr/include/stddef.h doesn't exist.

Thus, I'm accepting the patch.

On my debian machine stddef.h is in /usr/lib/gcc-lib/i486-linux/3.3.3/include/ and gcc can find it with <stddef.h> when compiling normally. Not sure
about when compiling a kernel.

Stephen