diff options
| author | Luka Perkov | 2016-05-10 22:36:45 +0000 |
|---|---|---|
| committer | Luka Perkov | 2016-05-10 22:36:45 +0000 |
| commit | b5b61dd59908c42833b9e6cd4360ad7a15659bec (patch) | |
| tree | df100cce2a855da79f193ce564c013024d0f7c01 | |
| parent | 4c46722d98e1fe5f2bd07c9d3b09cf907a739f15 (diff) | |
| download | archive-b5b61dd59908c42833b9e6cd4360ad7a15659bec.tar.gz | |
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>
SVN-Revision: 49338
| -rw-r--r-- | package/network/utils/xtables-addons/patches/201-fix-lua-packetscript.patch | 9 |
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__) |