diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-10 17:17:09 +0100 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-10-10 17:17:09 +0100 |
commit | 6e31344466e2558a99cd46bb29abaa37e1faffc6 (patch) | |
tree | ae51cd2a56c252d6f0df6755b76719fe121e81e3 /contrib | |
parent | c4d3eb4af41a17cf28cb4fbb171d9b70d98259b5 (diff) | |
download | rspamd-6e31344466e2558a99cd46bb29abaa37e1faffc6.tar.gz rspamd-6e31344466e2558a99cd46bb29abaa37e1faffc6.zip |
[Minor] Fix compile warnings
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/lua-lpeg/lptypes.h | 2 | ||||
-rw-r--r-- | contrib/lua-lpeg/lpvm.c | 3 |
2 files changed, 4 insertions, 1 deletions
diff --git a/contrib/lua-lpeg/lptypes.h b/contrib/lua-lpeg/lptypes.h index 7173d11d3..9dee116cd 100644 --- a/contrib/lua-lpeg/lptypes.h +++ b/contrib/lua-lpeg/lptypes.h @@ -154,9 +154,9 @@ typedef struct Charset { /* Special workaround for luajit */ #if defined(WITH_LUAJIT) && !(defined(_X86_) || defined(__x86_64__) || defined(__i386__)) # define LPEG_LUD_WORKAROUND 1 -#endif void * lpeg_allocate_mem_low(size_t sz); void lpeg_free_mem_low(void *p); +#endif #endif diff --git a/contrib/lua-lpeg/lpvm.c b/contrib/lua-lpeg/lpvm.c index 441712826..4ef424579 100644 --- a/contrib/lua-lpeg/lpvm.c +++ b/contrib/lua-lpeg/lpvm.c @@ -17,6 +17,7 @@ #include "lpvm.h" #include "lpprint.h" +#ifdef LPEG_LUD_WORKAROUND #include <sys/mman.h> #define MAX_PIECES (1u << 2u) @@ -119,6 +120,8 @@ lpeg_free_mem_low(void *p) /* No match, unmapped by allocation */ } +#endif + /* initial size for call/backtrack stack */ #if !defined(INITBACK) #define INITBACK MAXBACK |