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>
This commit is contained in:
parent
a6f76bffd8
commit
6a06cd8331
1 changed files with 6 additions and 3 deletions
|
@ -82,17 +82,20 @@
|
||||||
#define ltable_c
|
#define ltable_c
|
||||||
--- a/extensions/LUA/lua/luaconf.h
|
--- a/extensions/LUA/lua/luaconf.h
|
||||||
+++ b/extensions/LUA/lua/luaconf.h
|
+++ b/extensions/LUA/lua/luaconf.h
|
||||||
@@ -13,6 +13,10 @@
|
@@ -13,8 +13,12 @@
|
||||||
#if !defined(__KERNEL__)
|
#if !defined(__KERNEL__)
|
||||||
#include <limits.h>
|
#include <limits.h>
|
||||||
#else
|
#else
|
||||||
|
+#include <linux/kernel.h>
|
||||||
|
+
|
||||||
+#undef UCHAR_MAX
|
+#undef UCHAR_MAX
|
||||||
+#undef SHRT_MAX
|
|
||||||
+#undef BUFSIZ
|
+#undef BUFSIZ
|
||||||
+#undef NO_FPU
|
+#undef NO_FPU
|
||||||
#define UCHAR_MAX 255
|
#define UCHAR_MAX 255
|
||||||
#define SHRT_MAX 32767
|
-#define SHRT_MAX 32767
|
||||||
#define BUFSIZ 8192
|
#define BUFSIZ 8192
|
||||||
|
#define NO_FPU
|
||||||
|
#endif
|
||||||
@@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l;
|
@@ -637,6 +641,8 @@ union luai_Cast { double l_d; long l_l;
|
||||||
*/
|
*/
|
||||||
#if defined(__KERNEL__)
|
#if defined(__KERNEL__)
|
||||||
|
|
Loading…
Reference in a new issue