ldrumm/chronos

Does not build on 5.2

Closed this issue · 1 comments

gcc -O2 -fPIC -I/usr/include//lua5.2 -c src/chronos.c -o src/chronos.o
src/chronos.c:155:14: error: unknown type name ‘luaL_reg’
 static const luaL_reg chronos_reg[] = {
              ^
src/chronos.c:156:5: warning: braces around scalar initializer
     {"nanotime", chronos_nanotime},
     ^
src/chronos.c:156:5: warning: (near initialization for ‘chronos_reg[0]’)
src/chronos.c:156:5: warning: initialization makes integer from pointer without a cast
src/chronos.c:156:5: warning: (near initialization for ‘chronos_reg[0]’)
src/chronos.c:156:5: error: initializer element is not computable at load time
src/chronos.c:156:5: error: (near initialization for ‘chronos_reg[0]’)
src/chronos.c:156:5: warning: excess elements in scalar initializer
src/chronos.c:156:5: warning: (near initialization for ‘chronos_reg[0]’)
src/chronos.c:157:5: warning: braces around scalar initializer
     {NULL, NULL}
     ^
src/chronos.c:157:5: warning: (near initialization for ‘chronos_reg[1]’)
src/chronos.c:157:5: warning: initialization makes integer from pointer without a cast
src/chronos.c:157:5: warning: (near initialization for ‘chronos_reg[1]’)
src/chronos.c:157:5: warning: excess elements in scalar initializer
src/chronos.c:157:5: warning: (near initialization for ‘chronos_reg[1]’)

Error: Build error: Failed compiling object src/chronos.o

It appears that I used the old definition of static const luaL_reg[] rather than the static const struct luaL_Reg used for 5.2

was fixed in commit:a826ad6cda7b420ccdb645c881326d2986e15648