Fix undefined HOST_NAME_MAX on Windows.
authorEtienne Dechamps <etienne@edechamps.fr>
Sun, 31 Aug 2014 12:59:30 +0000 (13:59 +0100)
committerEtienne Dechamps <etienne@edechamps.fr>
Sun, 31 Aug 2014 12:59:30 +0000 (13:59 +0100)
commit9ad656b512582ed95a574b3fd74b948f876953ce
treeb6951063b370390aadb2208cfe7bf264bad4c7ce
parent0f09260b1377f2d6f14bcdf5de7cbad415743c1e
Fix undefined HOST_NAME_MAX on Windows.

The Windows build was broken by commit
826ad11e419db90b66b3f76a90b54df021bb39fc which introduced a dependency
on the HOST_NAME_MAX macro, which is not defined on Windows. According
to MSDN for gethostname(), the maximum length of the returned string
is 256 bytes (including the terminating null byte), so let's use that
as a fallback.
src/utils.c