From 256f011d2f256c8c2c05c37a518401199fa423bf Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 1 Nov 2023 05:09:40 +0100 Subject: Merging upstream version 4.2+20231026. Signed-off-by: Daniel Baumann --- mapfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'mapfile.c') diff --git a/mapfile.c b/mapfile.c index 34fea17..f1f3ee2 100644 --- a/mapfile.c +++ b/mapfile.c @@ -363,8 +363,7 @@ void RebuildMap(void) char *homehost = conf_get_homehost(&require_homehost); if (homehost == NULL || strcmp(homehost, "")==0) { - if (gethostname(sys_hostname, sizeof(sys_hostname)) == 0) { - sys_hostname[sizeof(sys_hostname)-1] = 0; + if (s_gethostname(sys_hostname, sizeof(sys_hostname)) == 0) { homehost = sys_hostname; } } -- cgit v1.2.3