xtables-addons: fix build for 64-bits targets
authorFlorian Fainelli <florian@openwrt.org>
Fri, 3 Aug 2012 13:32:39 +0000 (13:32 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Fri, 3 Aug 2012 13:32:39 +0000 (13:32 +0000)
The first fix is a pointer comparison fix, and the second is not to
override the Linux kernel's TARGET_LDFLAGS with those that we use
during cross-compiling.

SVN-Revision: 32958

net/xtables-addons/Makefile
net/xtables-addons/patches/200-add-lua-packetscript.patch

index 7c5d1c906a77ccd1da31577e394b5e3f46e2c8e4..27f170bd708809061a07420999513090bd25ae19 100644 (file)
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=xtables-addons
 PKG_VERSION:=1.42
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_MD5SUM:=7c996a0400667b57ab4fb53a013ae742
@@ -44,7 +44,6 @@ define Build/Compile
                CROSS_COMPILE="$(TARGET_CROSS)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                DEPMOD="/bin/true" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                all
 endef
 
@@ -54,7 +53,6 @@ define Build/Install
                CROSS_COMPILE="$(TARGET_CROSS)" \
                DESTDIR="$(PKG_INSTALL_DIR)" \
                DEPMOD="/bin/true" \
-               LDFLAGS="$(TARGET_LDFLAGS)" \
                install
 endef
 
index af7d1bc8eb73c267d06c75a3a9440477fb99cd75..03fe5fa9ff78933c26323f4dbfaaf179fad526d3 100644 (file)
 +      else if (pskb->transport_header)
 +              p->start = pskb->transport_header;
 +      p->offset = 0;
-+      p->length = pskb->tail - p->start;
++      p->length = (unsigned long)pskb->tail - (unsigned long)p->start;
 +      p->changes = NULL;
 +
 +      /* marking userdata 'lua_packet_seg' with the corresponding metatable */