Diff

util-src/pposix.c @ 7926:b009c27818c6

util.pposix: Expose ENOENT constant (usually 2, but you never know)
author Kim Alvefur <zash@zash.se>
date Wed, 01 Mar 2017 17:03:48 +0100
parent 7919:251bf68922d9
child 7931:b619b85e01aa
line wrap: on
line diff
--- a/util-src/pposix.c	Wed Mar 01 16:44:59 2017 +0100
+++ b/util-src/pposix.c	Wed Mar 01 17:03:48 2017 +0100
@@ -835,6 +835,11 @@
 	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");