summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/command.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/command.c b/lib/command.c
index 13fee70c62..78d8dbdc62 100644
--- a/lib/command.c
+++ b/lib/command.c
@@ -147,8 +147,10 @@ const char *domainname_get(void)
struct utsname names;
if (!host.name || !host.domainname) {
+#ifdef HAVE_STRUCT_UTSNAME_DOMAINNAME
uname(&names);
host.domainname = XSTRDUP(MTYPE_HOST, names.domainname);
+#endif
}
return host.domainname;
}