From 8e57f223289aeb8cf2eae3246cbd2dbf6ef29a12 Mon Sep 17 00:00:00 2001 From: Arne Fitzenreiter Date: Sun, 29 Jul 2012 16:24:05 +0200 Subject: [PATCH] miniupnpd: fix for build with newer iptables. IPT_ALIGN is replaces by XT_ALIGN since iptables 1.4 and the compatiblity macro is removed in 1.4.14. --- lfs/miniupnpd | 5 ++- src/patches/miniupnpd-1.4_use_XT_ALIGN.patch | 47 ++++++++++++++++++++ 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 src/patches/miniupnpd-1.4_use_XT_ALIGN.patch diff --git a/lfs/miniupnpd b/lfs/miniupnpd index 470fc28cbe..c7ba937737 100644 --- a/lfs/miniupnpd +++ b/lfs/miniupnpd @@ -1,7 +1,7 @@ ############################################################################### # # # IPFire.org - A linux based firewall # -# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# Copyright (C) 2007-2012 IPFire Team # # # # This program is free software: you can redistribute it and/or modify # # it under the terms of the GNU General Public License as published by # @@ -32,7 +32,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = miniupnpd -PAK_VER = 0 +PAK_VER = 1 ############################################################################### # Top-level Rules @@ -76,6 +76,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) @$(PREBUILD) @rm -rf $(DIR_APP) && cd $(DIR_SRC) && tar zxf $(DIR_DL)/$(DL_FILE) cd $(DIR_APP) && patch -Np0 -i $(DIR_SRC)/src/patches/miniupnpd-iptcrdr.patch + cd $(DIR_APP) && patch -Np1 -i $(DIR_SRC)/src/patches/miniupnpd-1.4_use_XT_ALIGN.patch cd $(DIR_APP) && make -f Makefile.linux \ CFLAGS="$(CFLAGS) -DIPTABLES_143 -I/usr/src/linux/include" diff --git a/src/patches/miniupnpd-1.4_use_XT_ALIGN.patch b/src/patches/miniupnpd-1.4_use_XT_ALIGN.patch new file mode 100644 index 0000000000..8c33222413 --- /dev/null +++ b/src/patches/miniupnpd-1.4_use_XT_ALIGN.patch @@ -0,0 +1,47 @@ +diff -Naur miniupnpd-1.4.org/netfilter/iptcrdr.c miniupnpd-1.4/netfilter/iptcrdr.c +--- miniupnpd-1.4.org/netfilter/iptcrdr.c 2009-10-10 21:19:41.000000000 +0200 ++++ miniupnpd-1.4/netfilter/iptcrdr.c 2012-07-29 16:09:42.640363971 +0200 +@@ -443,8 +443,8 @@ + struct ipt_entry_match *match; + struct ipt_tcp * tcpinfo; + size_t size; +- size = IPT_ALIGN(sizeof(struct ipt_entry_match)) +- + IPT_ALIGN(sizeof(struct ipt_tcp)); ++ size = XT_ALIGN(sizeof(struct ipt_entry_match)) ++ + XT_ALIGN(sizeof(struct ipt_tcp)); + match = calloc(1, size); + match->u.match_size = size; + strncpy(match->u.user.name, "tcp", IPT_FUNCTION_MAXNAMELEN); +@@ -462,8 +462,8 @@ + struct ipt_entry_match *match; + struct ipt_udp * udpinfo; + size_t size; +- size = IPT_ALIGN(sizeof(struct ipt_entry_match)) +- + IPT_ALIGN(sizeof(struct ipt_udp)); ++ size = XT_ALIGN(sizeof(struct ipt_entry_match)) ++ + XT_ALIGN(sizeof(struct ipt_udp)); + match = calloc(1, size); + match->u.match_size = size; + strncpy(match->u.user.name, "udp", IPT_FUNCTION_MAXNAMELEN); +@@ -483,8 +483,8 @@ + struct ip_nat_range * range; + size_t size; + +- size = IPT_ALIGN(sizeof(struct ipt_entry_target)) +- + IPT_ALIGN(sizeof(struct ip_nat_multi_range)); ++ size = XT_ALIGN(sizeof(struct ipt_entry_target)) ++ + XT_ALIGN(sizeof(struct ip_nat_multi_range)); + target = calloc(1, size); + target->u.target_size = size; + strncpy(target->u.user.name, "DNAT", IPT_FUNCTION_MAXNAMELEN); +@@ -614,8 +614,8 @@ + { + struct ipt_entry_target * target = NULL; + size_t size; +- size = IPT_ALIGN(sizeof(struct ipt_entry_target)) +- + IPT_ALIGN(sizeof(int)); ++ size = XT_ALIGN(sizeof(struct ipt_entry_target)) ++ + XT_ALIGN(sizeof(int)); + target = calloc(1, size); + target->u.user.target_size = size; + strncpy(target->u.user.name, "ACCEPT", IPT_FUNCTION_MAXNAMELEN); -- 2.39.5