]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
miniupnpd: fix for build with newer iptables.
authorArne Fitzenreiter <arne_f@ipfire.org>
Sun, 29 Jul 2012 14:24:05 +0000 (16:24 +0200)
committerArne Fitzenreiter <arne_f@ipfire.org>
Sun, 29 Jul 2012 14:24:05 +0000 (16:24 +0200)
IPT_ALIGN is replaces by XT_ALIGN since iptables 1.4
and the compatiblity macro is removed in 1.4.14.

lfs/miniupnpd
src/patches/miniupnpd-1.4_use_XT_ALIGN.patch [new file with mode: 0644]

index 470fc28cbe5b0e66da70be41e26b69b39dcf39b6..c7ba937737d5b69b95b314c87e2cd8c8e6f49213 100644 (file)
@@ -1,7 +1,7 @@
 ###############################################################################
 #                                                                             #
 # IPFire.org - A linux based firewall                                         #
-# Copyright (C) 2007  Michael Tremer & Christian Schmidt                      #
+# Copyright (C) 2007-2012  IPFire Team  <info@ipfire.org>                     #
 #                                                                             #
 # 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 (file)
index 0000000..8c33222
--- /dev/null
@@ -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);