summaryrefslogtreecommitdiff
path: root/src/basic/hostname-util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/basic/hostname-util.c')
-rw-r--r--src/basic/hostname-util.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/basic/hostname-util.c b/src/basic/hostname-util.c
index 5aebd89e3..63329d53b 100644
--- a/src/basic/hostname-util.c
+++ b/src/basic/hostname-util.c
@@ -57,7 +57,11 @@ char* gethostname_malloc(void) {
assert_se(uname(&u) >= 0);
if (isempty(u.nodename) || streq(u.nodename, "(none)"))
- return strdup(u.sysname);
+#if 0 /// elogind has no hostnamed and such nonsense
+ return strdup(FALLBACK_HOSTNAME);
+#else
+ return strdup("localhost");
+#endif // 0
return strdup(u.nodename);
}