projects
/
prosody.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
prosodyctl: check certs: Update messages to account for 'ssl' option maybe not existing
[prosody.git]
/
util-src
/
pposix.c
diff --git
a/util-src/pposix.c
b/util-src/pposix.c
index 5288b08cd03217e8c86db35cfa0c16a20027817c..1b69852d2a703cacf2619adeffe821ad5ddb3b94 100644
(file)
--- a/
util-src/pposix.c
+++ b/
util-src/pposix.c
@@
-35,8
+35,8
@@
#include "lualib.h"
#include "lauxlib.h"
#include "lualib.h"
#include "lauxlib.h"
-#if (LUA_VERSION_NUM == 50
2
)
-#define luaL_
register(L, N, R) luaL_setfuncs(L, R, 0
)
+#if (LUA_VERSION_NUM == 50
1
)
+#define luaL_
setfuncs(L, R, N) luaL_register(L, NULL, R
)
#endif
#include <fcntl.h>
#endif
#include <fcntl.h>
@@
-642,6
+642,10
@@
int lc_uname(lua_State* L) {
lua_setfield(L, -2, "version");
lua_pushstring(L, uname_info.machine);
lua_setfield(L, -2, "machine");
lua_setfield(L, -2, "version");
lua_pushstring(L, uname_info.machine);
lua_setfield(L, -2, "machine");
+#ifdef _GNU_SOURCE
+ lua_pushstring(L, uname_info.domainname);
+ lua_setfield(L, -2, "domainname");
+#endif
return 1;
}
return 1;
}
@@
-803,7
+807,7
@@
int luaopen_util_pposix(lua_State* L) {
};
lua_newtable(L);
};
lua_newtable(L);
- luaL_
register(L, NULL, exports
);
+ luaL_
setfuncs(L, exports, 0
);
lua_pushliteral(L, "pposix");
lua_setfield(L, -2, "_NAME");
lua_pushliteral(L, "pposix");
lua_setfield(L, -2, "_NAME");