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 --- Monitor.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Monitor.c') diff --git a/Monitor.c b/Monitor.c index 6617596..e74a055 100644 --- a/Monitor.c +++ b/Monitor.c @@ -222,11 +222,10 @@ int Monitor(struct mddev_dev *devlist, info.dosyslog = dosyslog; info.test = c->test; - if (gethostname(info.hostname, sizeof(info.hostname)) != 0) { + if (s_gethostname(info.hostname, sizeof(info.hostname)) != 0) { pr_err("Cannot get hostname.\n"); return 1; } - info.hostname[sizeof(info.hostname) - 1] = '\0'; if (share){ if (check_one_sharer(c->scan) == 2) -- cgit v1.2.3