aboutsummaryrefslogtreecommitdiffstats
path: root/package/network
diff options
context:
space:
mode:
authorLuka Perkov <luka@openwrt.org>2016-05-10 22:36:45 +0000
committerLuka Perkov <luka@openwrt.org>2016-06-19 19:29:48 +0200
commitab0a61efa23e13b74870ccc2874c4cdb7d2b7fe8 (patch)
treedf100cce2a855da79f193ce564c013024d0f7c01 /package/network
parent8d4d609a5178c64bbe4206e81f054ba943db2703 (diff)
downloadmaster-187ad058-ab0a61efa23e13b74870ccc2874c4cdb7d2b7fe8.tar.gz
master-187ad058-ab0a61efa23e13b74870ccc2874c4cdb7d2b7fe8.tar.bz2
master-187ad058-ab0a61efa23e13b74870ccc2874c4cdb7d2b7fe8.zip
xtables-addons: Avoid redefinition of SHRT_MAX in lua packet script
Patch Lua packet script defines SHRT_MAX which is already defined in <linux/kernel.h> and is included indirectly by lauxlib.h. Fix the redefintion as it leads to compile failure on systems which treat macro redefinition as an error Signed-off-by: Hans Dedecker <dedeckeh@gmail.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@49338 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/network')
-rw-r--r--package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch9
1 files changed, 6 insertions, 3 deletions
diff --git a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch
index ebc952bca3..02250ec206 100644
--- a/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch
+++ b/package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch
@@ -82,17 +82,20 @@
#define ltable_c
--- a/extensions/LUA/lua/luaconf.h
+++ b/extensions/LUA/lua/luaconf.h
-@@ -13,6 +13,10 @@
+@@ -13,8 +13,12 @@
#if !defined(__KERNEL__)
#include <limits.h>
#else
++#include <linux/kernel.h>
++
+#undef UCHAR_MAX
-+#undef SHRT_MAX
+#undef BUFSIZ
+#undef NO_FPU
#define UCHAR_MAX 255
- #define SHRT_MAX 32767
+-#define SHRT_MAX 32767
#define BUFSIZ 8192
+ #define NO_FPU
+ #endif
@@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l;
*/
#if defined(__KERNEL__)