]> git.ipfire.org Git - thirdparty/iptables.git/commitdiff
xtables: use extern "C"
authorJan Engelhardt <jengelh@medozas.de>
Fri, 22 May 2009 09:46:55 +0000 (11:46 +0200)
committerJan Engelhardt <jengelh@medozas.de>
Tue, 26 May 2009 11:12:05 +0000 (13:12 +0200)
This fixes linking errors for 3rd-party C++ code.

Signed-off-by: Jan Engelhardt <jengelh@medozas.de>
include/xtables.h.in

index a399f90f21ec9d6a4bda32f08e484e072b1ba184..4d4ca0a60c9a688560205608972ccf2e8971da34 100644 (file)
@@ -203,6 +203,10 @@ struct xtables_globals
        void (*exit_err)(enum xtables_exittype status, const char *msg, ...) __attribute__((noreturn, format(printf,2,3)));
 };
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 extern const char *xtables_modprobe_program;
 extern struct xtables_match *xtables_matches;
 extern struct xtables_target *xtables_targets;
@@ -295,4 +299,8 @@ extern void _init(void);
 
 #endif
 
+#ifdef __cplusplus
+} /* extern "C" */
+#endif
+
 #endif /* _XTABLES_H */