Closed demyanovs closed 6 years ago
@demyanovs thanks for your report. it works for me(ubuntu).
paste your env plz.
os version: e.g. cat /etc/os-release
openresty version: e.g. openresty -V
maxmind/libmaxminddb version: e.g. mmdblookup --version
#define ssize_t SSIZE_T
typedef struct MMDB_s {
uint32_t flags;
const char *filename;
ssize_t file_size;
const uint8_t *file_content;
const uint8_t *data_section;
uint32_t data_section_size;
const uint8_t *metadata_section;
uint32_t metadata_section_size;
uint16_t full_record_byte_size;
uint16_t depth;
MMDB_ipv4_start_node_s ipv4_start_node;
MMDB_metadata_s metadata;
} MMDB_s;
This error occurred when I ran lua without openresty, so the error is probably on my side.
ok
Hi, When I include file "local geo = require 'resty.maxminddb'" I get an error: lua entry thread aborted: runtime error: .../resty_modules/lualib/resty/maxminddb.lua:115: declaration specifier expected near 'ssize_t' at line 73
It seems that should be typedef ssize_t in case if it is not declared. When I declare ssize_t as long or size_t, the error disappears.
My lua version: 5.1