From f4b4aac5e5ee4e1397c3f8a2b03183e2bda16a04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Alexander=20F=C3=A6r=C3=B8y?= Date: Tue, 29 Sep 2015 15:03:38 +0200 Subject: [PATCH] Use _POSIX_HOST_NAME_MAX instead of HOST_NAME_MAX. Thanks to @tykling for helping out with FreeBSD. --- src/irc/core/irc-expandos.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/irc/core/irc-expandos.c b/src/irc/core/irc-expandos.c index 5d8150f0..81cabb4f 100644 --- a/src/irc/core/irc-expandos.c +++ b/src/irc/core/irc-expandos.c @@ -27,6 +27,8 @@ #include "irc-channels.h" #include "nicklist.h" +#include + static char *last_join; /* last person to join a channel you are on */ @@ -56,7 +58,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret) { IRC_SERVER_REC *ircserver; const char *username; - char hostname[HOST_NAME_MAX]; + char hostname[_POSIX_HOST_NAME_MAX]; ircserver = IRC_SERVER(server); @@ -80,7 +82,7 @@ static char *expando_userhost(SERVER_REC *server, void *item, int *free_ret) static char *expando_hostname(SERVER_REC *server, void *item, int *free_ret) { IRC_SERVER_REC *ircserver; - char hostname[HOST_NAME_MAX]; + char hostname[_POSIX_HOST_NAME_MAX]; char **list; char *hostname_split;