From 8e63a2bd3bd94e13c9950543da3859d512838e11 Mon Sep 17 00:00:00 2001 From: Kim Alvefur Date: Wed, 25 Nov 2015 20:43:29 +0100 Subject: util.pposix: Expose the uname GNU extension field 'domainname' --- util-src/pposix.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'util-src/pposix.c') 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; } -- cgit v1.2.3