Skip to contentSkip to conversation

cvs compile error.

PATCH In review Maciej Soltysiak 2 participants 3 messages May 5, 2003 – May 6, 2003 1 message not in the archive netfilter

lore
Share & tools
lore

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

#1 lore raw

PATCH 1/1 cvs compile error.

Hi,

it seems as:
ipt_get_target(struct ipt_entry *e)

is defined in <kernel_source>/include/linux/netfilter_ipv4/ip_tables.h and in iptables.c

The same goes for libiptc/libiptc.c

iptables.c:153: redefinition of ipt_get_target' /usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:294: ipt_get_target' previously defined here
make: *** [iptables.o] Error 1

Regards,
Maciej

Is this below okay?
It compiles with it, and seems to work just fine.

ip6tables.c +0 -8
diff -u -r1.28 ip6tables.c
@@ -148,14 +148,6 @@
  * magic number of -1 */
 int line = -1;
 
-#ifndef __OPTIMIZE__
-struct ip6t_entry_target *
-ip6t_get_target(struct ip6t_entry *e)
-{
-	return (void *)e + e->target_offset;
-}
-#endif
-
 static struct option *opts = original_opts;
 static unsigned int global_option_offset = 0;
 

Index: iptables.c
===================================================================
RCS file: /cvspublic/netfilter/userspace/iptables.c,v retrieving revision 1.58

iptables.c +0 -8
diff -u -r1.58 iptables.c
@@ -147,14 +147,6 @@
  * magic number of -1 */
 int line = -1;
 
-#ifndef __OPTIMIZE__
-struct ipt_entry_target *
-ipt_get_target(struct ipt_entry *e)
-{
-	return (void *)e + e->target_offset;
-}
-#endif
-
 static struct option *opts = original_opts;
 static unsigned int global_option_offset = 0;
 

Index: libiptc/libiptc.c
===================================================================
RCS file: /cvspublic/netfilter/userspace/libiptc/libiptc.c,v retrieving revision 1.37

libiptc.c +0 -8
diff -u -r1.37 libiptc.c
@@ -15,14 +15,6 @@
 #define IPT_LIB_DIR "/usr/local/lib/iptables"
 #endif
 
-#ifndef __OPTIMIZE__
-STRUCT_ENTRY_TARGET *
-GET_TARGET(STRUCT_ENTRY *e)
-{
-	return (void *)e + e->target_offset;
-}
-#endif
-
 static int sockfd = -1;
 static void *iptc_fn = NULL;
#2 lore raw
Quoted 14 lines · Maciej Soltysiak

Hi,

it seems as:
ipt_get_target(struct ipt_entry *e)

is defined in <kernel_source>/include/linux/netfilter_ipv4/ip_tables.h and in iptables.c

The same goes for libiptc/libiptc.c

iptables.c:153: redefinition of ipt_get_target' /usr/src/linux/include/linux/netfilter_ipv4/ip_tables.h:294: ipt_get_target' previously defined here
make: *** [iptables.o] Error 1

Quoted 5 lines

Regards,
Maciej

Is this below okay?
It compiles with it, and seems to work just fine.

Please read
https://bugzilla.netfilter.org/cgi-bin/bugzilla/show_bug.cgi?id=82

Signature · 1 line
/Martin