| Date: Mon, 12 Nov 2018 22:34:30 +0100
Do not use HOST_NAME_MAX, NetBSD does not have it.
Diffstat:
M main.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
--- |
| @@ -23,7 +23,6 @@
#include
#include
#include
-#include
#include
#include
@@ -481,8 +480,9 @@ main(int argc, char *argv[])
usage();
if (ohost == NULL) {
- ohost = xcalloc(1, HOST_NAME_MAX+1);
- if (gethostname(ohost, HOST_NAME_MAX) < 0) {
+ /* Do not use MAX_NAME_HOST, it is not defined on NetBSD. */
+ ohost = xcalloc(1, 256+1);
+ if (gethostname(ohost, 256) < 0) {
perror("gethostname");
free(ohost);
return 1; |