]> git.ipfire.org Git - thirdparty/mdadm.git/blobdiff - mapfile.c
Create.c: fix uclibc build
[thirdparty/mdadm.git] / mapfile.c
index 34fea179b4c3cca649bf1cf657703eb99ba44eac..f1f3ee2cdc77bbe030a269c88d9a83e73b67c425 100644 (file)
--- 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, "<system>")==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;
                }
        }