From 6a06cd833187f09fdb4dd9b5ee169791fbde6047 Mon Sep 17 00:00:00 2001 From: Hans Dedecker Date: Mon, 2 May 2016 11:57:59 +0200 Subject: [PATCH] xtables-addons: Avoid redefinition of SHRT_MAX in lua packet script Patch Lua packet script defines SHRT_MAX which is already defined in 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 --- .../patches/201-fix-lua-packetscript.patch | 9 ++++++--- 1 file 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 ebc952bca36..02250ec206b 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 #else ++#include ++ +#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__) -- 2.30.2