An adaptor from classic PUC-Rio lposix to luajit/ljsyscall
Slap lposix.lua anywhere in your LUA_PATH and make sure ljsyscall is installed too.
As it turns out, this is mostly a matter of connecting the dots. At least there is (a scarce amount of) ldoc to look at.