]> git.ipfire.org Git - thirdparty/git.git/blobdiff - builtin/gc.c
xgethostname: handle long hostnames
[thirdparty/git.git] / builtin / gc.c
index 5befd518fd1616c606efef9e4be15d6283811530..4f85610d87697e67368a57baa5550108fdeb6d10 100644 (file)
@@ -232,7 +232,7 @@ static const char *lock_repo_for_gc(int force, pid_t* ret_pid)
                /* already locked */
                return NULL;
 
-       if (gethostname(my_host, sizeof(my_host)))
+       if (xgethostname(my_host, sizeof(my_host)))
                xsnprintf(my_host, sizeof(my_host), "unknown");
 
        pidfile_path = git_pathdup("gc.pid");