aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2017-03-01 17:03:48 +0100
committerKim Alvefur <zash@zash.se>2017-03-01 17:03:48 +0100
commit82755e48e832ca94886d0d4376343ac74cf00bd6 (patch)
treee3b67355e3780f180588da3bf1f67f12e9535eb4
parentfc38b8c4f4fe84d6ed15128a96348f5a256bb9a2 (diff)
downloadprosody-82755e48e832ca94886d0d4376343ac74cf00bd6.tar.gz
prosody-82755e48e832ca94886d0d4376343ac74cf00bd6.zip
util.pposix: Expose ENOENT constant (usually 2, but you never know)
-rw-r--r--util-src/pposix.c5
1 files changed, 5 insertions, 0 deletions
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");