config.mak.uname: set FREAD_READS_DIRECTORIES for Linux and FreeBSD
[gitweb.git] / fetch-pack.c
index c5e686706100fc5f6b3a3ede30b0c6ce6a8645d6..afb8b05024823981be9bedfaa70f7301c6f7076c 100644 (file)
@@ -804,8 +804,8 @@ static int get_pack(struct fetch_pack_args *args,
                if (args->use_thin_pack)
                        argv_array_push(&cmd.args, "--fix-thin");
                if (args->lock_pack || unpack_limit) {
-                       char hostname[256];
-                       if (gethostname(hostname, sizeof(hostname)))
+                       char hostname[HOST_NAME_MAX + 1];
+                       if (xgethostname(hostname, sizeof(hostname)))
                                xsnprintf(hostname, sizeof(hostname), "localhost");
                        argv_array_pushf(&cmd.args,
                                        "--keep=fetch-pack %"PRIuMAX " on %s",