From 82755e48e832ca94886d0d4376343ac74cf00bd6 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 1 Mar 2017 17:03:48 +0100 Subject: util.pposix: Expose ENOENT constant (usually 2, but you never know) --- util-src/pposix.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'util-src') diff --git a/util-src/pposix.c b/util-src/pposix.c index 10edbd71..da47cac2 100644 --- a/util-src/pposix.c +++ b/util-src/pposix.c @@ -835,6 +835,11 @@ int luaopen_util_pposix(lua_State *L) { lua_newtable(L); luaL_setfuncs(L, exports, 0); +#ifdef ENOENT + lua_pushinteger(L, ENOENT); + lua_setfield(L, -2, "ENOENT"); +#endif + lua_pushliteral(L, "pposix"); lua_setfield(L, -2, "_NAME"); -- cgit v1.2.3