diff options
author | Bertrand Jacquin <bertrand@jacquin.bzh> | 2021-01-21 21:14:07 +0000 |
---|---|---|
committer | Willy Tarreau <w@1wt.eu> | 2021-01-22 16:17:56 +0100 |
commit | f4c12d4da25cd9da14215b0c4ee740d2b2ef762e (patch) | |
tree | a272f1b27c8d0a2e7fb2afa391e4c01e1dd7a2f6 | |
parent | 80839ff8e40679c6062bfb8b464ee03c7efe71a8 (diff) | |
download | haproxy-f4c12d4da25cd9da14215b0c4ee740d2b2ef762e.tar.gz |
BUILD/MINOR: lua: define _GNU_SOURCE for LLONG_MAX
Lua requires LLONG_MAX defined with __USE_ISOC99 which is set by
_GNU_SOURCE, not necessarely defined by default on old compiler/glibc.
$ make V=1 TARGET=linux-glibc-legacy USE_THREAD= USE_ACCEPT4= USE_PCRE=1 USE_OPENSSL=1 USE_ZLIB=1 USE_LUA=1
..
cc -Iinclude -O2 -g -Wall -Wextra -Wdeclaration-after-statement -fwrapv -Wno-strict-aliasing -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -DUSE_EPOLL -DUSE_NETFILTER -DUSE_PCRE -DUSE_POLL -DUSE_TPROXY -DUSE_LINUX_TPROXY -DUSE_LINUX_SPLICE -DUSE_LIBCRYPT -DUSE_CRYPT_H -DUSE_GETADDRINFO -DUSE_OPENSSL -DUSE_LUA -DUSE_FUTEX -DUSE_ZLIB -DUSE_CPU_AFFINITY -DUSE_DL -DUSE_RT -DUSE_PRCTL -DUSE_THREAD_DUMP -I/usr/include/openssl101e/ -DUSE_PCRE -I/usr/include -DCONFIG_HAPROXY_VERSION=\"2.4-dev5-73246d-83\" -DCONFIG_HAPROXY_DATE=\"2021/01/21\" -c -o src/hlua.o src/hlua.c
In file included from /usr/local/include/lua.h:15,
from /usr/local/include/lauxlib.h:15,
from src/hlua.c:16:
/usr/local/include/luaconf.h:581:2: error: #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
..
cc -Iinclude -O2 -g -Wall -Wextra -Wdeclaration-after-statement -fwrapv -Wno-strict-aliasing -Wno-unused-label -Wno-sign-compare -Wno-unused-parameter -Wno-missing-field-initializers -DUSE_EPOLL -DUSE_NETFILTER -DUSE_PCRE -DUSE_POLL -DUSE_TPROXY -DUSE_LINUX_TPROXY -DUSE_LINUX_SPLICE -DUSE_LIBCRYPT -DUSE_CRYPT_H -DUSE_GETADDRINFO -DUSE_OPENSSL -DUSE_LUA -DUSE_FUTEX -DUSE_ZLIB -DUSE_CPU_AFFINITY -DUSE_DL -DUSE_RT -DUSE_PRCTL -DUSE_THREAD_DUMP -I/usr/include/openssl101e/ -DUSE_PCRE -I/usr/include -DCONFIG_HAPROXY_VERSION=\"2.4-dev5-73246d-83\" -DCONFIG_HAPROXY_DATE=\"2021/01/21\" -c -o src/hlua_fcn.o src/hlua_fcn.c
In file included from /usr/local/include/lua.h:15,
from /usr/local/include/lauxlib.h:15,
from src/hlua_fcn.c:17:
/usr/local/include/luaconf.h:581:2: error: #error "Compiler does not support 'long long'. Use option '-DLUA_32BITS' or '-DLUA_C89_NUMBERS' (see file 'luaconf.h' for details)"
..
Cc: Thierry Fournier <tfournier@arpalert.org>
-rw-r--r-- | src/hlua.c | 2 | ||||
-rw-r--r-- | src/hlua_fcn.c | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/src/hlua.c b/src/hlua.c index 785a1fa36..0de1937db 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -10,6 +10,8 @@ * */ +#define _GNU_SOURCE + #include <ctype.h> #include <setjmp.h> diff --git a/src/hlua_fcn.c b/src/hlua_fcn.c index 1f66c181f..aab864370 100644 --- a/src/hlua_fcn.c +++ b/src/hlua_fcn.c @@ -14,6 +14,9 @@ * in an environment able to catch a longjmp, otherwise a * critical error can be raised. */ + +#define _GNU_SOURCE + #include <lauxlib.h> #include <lua.h> #include <lualib.h> |