Closed SlawekNowy closed 1 month ago
Both random
and srandom
are POSIX functions, which is not in C standard.
I don't have a test environment. Maybe need to define the _XOPEN_SOURCE macro.
Submitted the issue to submodule with the fix:
https://github.com/openresty/luajit2/issues/232.
The fix is in C file due to luamake not accepting gnu89
as valid value for luamake::c
prop.
I've added gnu support to luamake, but I think just define _XOPEN_SOURCE, like lua51/lua52 does.
I would add this to lj_str_hash
target which was convienently sepatared from the rest.
Confirmed that adding _XOPEN_SOURCE=600
for defines is sufficient.