aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-17 23:30:34 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2020-09-17 23:30:34 +0100
commitfd396a6293be7997767b1e97662693abf39c5a1a (patch)
tree7b1a95428a13f42d162780e9643564cf82ddf774 /contrib
parentd05d841321b6889b035327caa71f10084130ca4a (diff)
downloadrspamd-fd396a6293be7997767b1e97662693abf39c5a1a.tar.gz
rspamd-fd396a6293be7997767b1e97662693abf39c5a1a.zip
[Fix] Do not use GC64 workaround on 32bit platforms, omg
Issue: #3459
Diffstat (limited to 'contrib')
-rw-r--r--contrib/lua-lpeg/lptypes.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/lua-lpeg/lptypes.h b/contrib/lua-lpeg/lptypes.h
index e69a9ed6b..5748c8560 100644
--- a/contrib/lua-lpeg/lptypes.h
+++ b/contrib/lua-lpeg/lptypes.h
@@ -17,6 +17,7 @@
#include <assert.h>
#include <limits.h>
+#include <stdint.h>
#include "lua.h"
@@ -151,8 +152,9 @@ typedef struct Charset {
#define testchar(st,c) (((int)(st)[((c) >> 3)] & (1 << ((c) & 7))))
-/* Special workaround for luajit */
-#if defined(WITH_LUAJIT) && !(defined(_X86_) || defined(__x86_64__) || defined(__i386__) || defined(__powerpc__))
+/* Special workaround for luajit lightuserdata limitations with GC64 */
+#if defined(WITH_LUAJIT) && INTPTR_MAX == INT64_MAX && \
+ !(defined(_X86_) || defined(__x86_64__) || defined(__i386__) || defined(__powerpc__))
# define LPEG_LUD_WORKAROUND 1
void * lpeg_allocate_mem_low(size_t sz);
void lpeg_free_mem_low(void *p);