aboutsummaryrefslogtreecommitdiffstats
path: root/util-src/pposix.c
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2015-11-25 20:43:29 +0100
committerKim Alvefur <zash@zash.se>2015-11-25 20:43:29 +0100
commitc8454e918047a5de57dcdaeb3ffe94e43bb9bb9b (patch)
treed1bf76e5b97bf5694b79d22e77cfdae3518faf45 /util-src/pposix.c
parent273a126b4b19876418f091ad462897576325040b (diff)
downloadprosody-c8454e918047a5de57dcdaeb3ffe94e43bb9bb9b.tar.gz
prosody-c8454e918047a5de57dcdaeb3ffe94e43bb9bb9b.zip
util.pposix: Expose the uname GNU extension field 'domainname'
Diffstat (limited to 'util-src/pposix.c')
-rw-r--r--util-src/pposix.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/util-src/pposix.c b/util-src/pposix.c
index 02ea0087..1b69852d 100644
--- a/util-src/pposix.c
+++ b/util-src/pposix.c
@@ -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");
+#ifdef _GNU_SOURCE
+ lua_pushstring(L, uname_info.domainname);
+ lua_setfield(L, -2, "domainname");
+#endif
return 1;
}