fix compile error in libxt_condition
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); }
Quoted 9 lines · Thomas Jarosch
Hello Jan,
attached is a small patch to fix the compilation of
libxt_conditioninxtables_addonsusing gcc 4.3.2.Fix compile error in
libxt_conditionlibxt_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?
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 hereDoes this only hit
libxt_condition? Who set theXTABLES_INTERNALmacro to trigger inclusion ofxtables/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
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 theXTABLES_INTERNALmacro to trigger inclusion ofxtables/internal.h?Good question, I manually downloaded
libxt_conditionfrom your gitweb as it's the only extension I needed from xtables addons.XTABLES_INTERNALgets 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.
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.cfrom *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