Skip to contentSkip to conversation

fix compile error in libxt_condition

PATCH In review Thomas Jarosch 2 participants 5 messages Oct 23, 2008 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fix compile error in libxt_condition

Hello Jan,

attached is a small patch to fix the compilation of libxt_condition in xtables_addons using gcc 4.3.2.

Cheers,
Thomas

Fix compile error in libxt_condition

libxt_condition.c:95: error: static declaration of 'libxt_condition_init' follows non-static declaration ../include/xtables/internal.h:64: error: previous declaration of 'libxt_condition_init' was here

xt_condition.c/libxt_condition.c +1 -1
@@ -92,7 +92,7 @@
 	.extra_opts 	= condition_opts,
 };
 
-static void _init(void)
+void _init(void)
 {
 	xtables_register_match(&condition_mt_reg);
 }
#1 lore raw
Quoted 9 lines · Thomas Jarosch

Hello Jan,

attached is a small patch to fix the compilation of libxt_condition in xtables_addons using gcc 4.3.2.

Fix compile error in libxt_condition

libxt_condition.c:95: error: static declaration of 'libxt_condition_init' follows non-static declaration ../include/xtables/internal.h:64: error: previous declaration of 'libxt_condition_init' was here

Does this only hit libxt_condition? Who set the XTABLES_INTERNAL macro to trigger inclusion of xtables/internal.h?

#2 lore raw
Quoted 6 lines · On Thursday, 23. October 2008 14:18:26 Jan Engelhardt wrote:
Quoted 3 lines

libxt_condition.c:95: error: static declaration of 'libxt_condition_init' follows non-static declaration ../include/xtables/internal.h:64: error:
previous declaration of 'libxt_condition_init' was here

Does this only hit libxt_condition? Who set the XTABLES_INTERNAL macro to trigger inclusion of xtables/internal.h?

Good question, I manually downloaded libxt_condition from your gitweb as it's the only extension I needed from xtables addons. XTABLES_INTERNAL gets set by the "extensions/GNUmakefile" in "regular_CFLAGS".
A quick grep reveals it gets always defined in configure.ac.

Thomas

#3 lore raw
Quoted 5 lines · Thomas Jarosch
Quoted 4 lines · On Thursday, 23. October 2008 14:18:26 Jan Engelhardt wrote:
Quoted 3 lines

libxt_condition.c:95: error: static declaration of 'libxt_condition_init' follows non-static declaration ../include/xtables/internal.h:64: error:
previous declaration of 'libxt_condition_init' was here

Quoted 7 lines
Quoted 2 lines

Does this only hit libxt_condition? Who set the XTABLES_INTERNAL macro to trigger inclusion of xtables/internal.h?

Good question, I manually downloaded libxt_condition from your gitweb as it's the only extension I needed from xtables addons. XTABLES_INTERNAL gets set by the "extensions/GNUmakefile" in "regular_CFLAGS".
A quick grep reveals it gets always defined in configure.ac.

No way.

09:11 nuqneh:~/Coding/xtables-addons > grep -r XTABLES_INTERNAL . 09:11 nuqneh:~/Coding/xtables-addons >

Wait... you downloaded libxt_condition.c from *xtables-addons* and put it into the *iptables/* tree? Well, that is not going to fly on its own. You need the patch of course, but then this is not an xtables-addons problem.

#4 lore raw
Quoted 11 lines
Quoted 1 line

A quick grep reveals it gets always defined in configure.ac.

No way.

09:11 nuqneh:~/Coding/xtables-addons > grep -r XTABLES_INTERNAL . 09:11 nuqneh:~/Coding/xtables-addons >

Wait... you downloaded libxt_condition.c from *xtables-addons* and put it into the *iptables/* tree? Well, that is not going to fly on its own. You need the patch of course, but then this is not an xtables-addons problem.

Thanks for checking! As long as it works on my box, I'm happy :-)

Thomas