use HOST_NAME_MAX to size buffers for gethostname(2)
[gitweb.git] / git-compat-util.h
index d89a78616b6934a529473080df97990bfb8632e1..1f1e82407e1e93dbe7e47b94ca4aef01d4910d08 100644 (file)
@@ -878,6 +878,10 @@ static inline size_t xsize_t(off_t len)
 __attribute__((format (printf, 3, 4)))
 extern int xsnprintf(char *dst, size_t max, const char *fmt, ...);
 
+#ifndef HOST_NAME_MAX
+#define HOST_NAME_MAX 256
+#endif
+
 /* in ctype.c, for kwset users */
 extern const unsigned char tolower_trans_tbl[256];