summaryrefslogtreecommitdiff
path: root/test/scr/index_full_h400
diff options
context:
space:
mode:
authorNiclas Zeising <zeising@daemonic.se>2016-08-31 19:12:27 +0200
committerNiclas Zeising <zeising@daemonic.se>2016-08-31 19:12:27 +0200
commit873c84f0722b4edf98e46d6c966c0d3618bfb2ac (patch)
tree8d619314631565908bf28da48d8c60d46c49ef7f /test/scr/index_full_h400
parentf940401bbcf0af43adbf28748a717edd651bbe22 (diff)
Fix build on FreeBSD.
FreeBSD lacks the constant HOST_NAME_MAX, instead using sysconf(3) to find out the value of the maximum host name length at run time. Patch to use this instead of HOST_NAME_MAX. This brings with it the need to use malloc instead of using a statically sized buffer for the host name, since the size of the buffer cannot be known at run time. Errors from sysconf or malloc just means that the entire block of code is skipped over (the same way it's skipped if the call to gethostname() fails), rather than returning any kind of error to the caller or logging an error message somewhere.
Diffstat (limited to 'test/scr/index_full_h400')
0 files changed, 0 insertions, 0 deletions