From f56b8a8bf4b1041cb875fd8439778f35276bdb30 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Sat, 3 Sep 2011 14:27:55 +0200 Subject: iptables: move kernel version find routing into libxtables That way, the remaining unreferenced symbols that do appear in libipt_DNAT and libipt_SNAT as part of the new check can be resolved, and the ugly -rdynamic hack can finally be removed. Signed-off-by: Jan Engelhardt --- include/xtables.h.in | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include/xtables.h.in') diff --git a/include/xtables.h.in b/include/xtables.h.in index d50df79a..28e29337 100644 --- a/include/xtables.h.in +++ b/include/xtables.h.in @@ -477,6 +477,14 @@ extern void xtables_save_string(const char *value); extern const struct xtables_pprot xtables_chain_protos[]; extern u_int16_t xtables_parse_protocol(const char *s); +/* kernel revision handling */ +extern int kernel_version; +extern void get_kernel_version(void); +#define LINUX_VERSION(x,y,z) (0x10000*(x) + 0x100*(y) + z) +#define LINUX_VERSION_MAJOR(x) (((x)>>16) & 0xFF) +#define LINUX_VERSION_MINOR(x) (((x)>> 8) & 0xFF) +#define LINUX_VERSION_PATCH(x) ( (x) & 0xFF) + /* xtoptions.c */ extern void xtables_option_metavalidate(const char *, const struct xt_option_entry *); -- cgit v1.2.3