aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ftutil.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@jelmer.uk>2016-12-28 13:50:14 +0000
committerdx <dx@dxzone.com.ar>2016-12-31 17:40:09 -0300
commit2e8523b30bafa86685655001457a2615936b646a (patch)
tree4e0c9c6509d1b3aeca395bc17e258f4a38b48325 /lib/ftutil.h
parent7801298f6a855cda0c62433d45ec717d2773ef73 (diff)
Use NI_MAXHOST rather than HOST_NAME_MAX for host lengths.
This constant is always available and meant to be used with getnameinfo(). This fixes the build on Debian GNU/kFreeBSD.
Diffstat (limited to 'lib/ftutil.h')
-rw-r--r--lib/ftutil.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/lib/ftutil.h b/lib/ftutil.h
index d8317b2f..054d6534 100644
--- a/lib/ftutil.h
+++ b/lib/ftutil.h
@@ -25,17 +25,7 @@
#define AI_NUMERICSERV 0x0400 /* Don't use name resolution. */
#endif
-/* Some ifdefs for ulibc and apparently also BSD (Thanks to Whoopie) */
-#ifndef HOST_NAME_MAX
-#include <sys/param.h>
-#ifdef MAXHOSTNAMELEN
-#define HOST_NAME_MAX MAXHOSTNAMELEN
-#else
-#define HOST_NAME_MAX 255
-#endif
-#endif
-
/* This function should be used with care. host should be AT LEAST a
- char[HOST_NAME_MAX+1] and port AT LEAST a char[6]. */
+ char[NI_MAXHOST+1] and port AT LEAST a char[6]. */
int ft_listen(struct sockaddr_storage *saddr_ptr, char *host, char *port, int copy_fd, int for_bitlbee_client,
char **errptr);