From: Jelmer Vernooij Date: Sat, 8 Sep 2007 01:39:31 +0000 (+0000) Subject: r25017: Move MAXHOSTNAMELEN definition to replace.h as it is usually part of X-Git-Url: http://git.samba.org/samba.git/?p=kai%2Fsamba.git;a=commitdiff_plain;h=d0f3d4a2f1c674f6b07b6ec4640a2c8d033bad2a r25017: Move MAXHOSTNAMELEN definition to replace.h as it is usually part of sys/param.h. (This used to be commit 7016d500287ae587d044744f2a318c402148ebea) --- diff --git a/source4/lib/replace/replace.h b/source4/lib/replace/replace.h index 06173bd84b9..052c7346a3e 100644 --- a/source4/lib/replace/replace.h +++ b/source4/lib/replace/replace.h @@ -375,6 +375,14 @@ ssize_t rep_pwrite(int __fd, const void *__buf, size_t __nbytes, off_t __offset) #define HOST_NAME_MAX 64 #endif +/* + * Some older systems seem not to have MAXHOSTNAMELEN + * defined. + */ +#ifndef MAXHOSTNAMELEN +#define MAXHOSTNAMELEN HOST_NAME_MAX +#endif + #ifndef UINT16_MAX #define UINT16_MAX 65535 #endif diff --git a/source4/lib/replace/system/network.h b/source4/lib/replace/system/network.h index 13d95a8ba7b..7469040b283 100644 --- a/source4/lib/replace/system/network.h +++ b/source4/lib/replace/system/network.h @@ -98,14 +98,6 @@ char *rep_inet_ntoa(struct in_addr ip); #define MSG_WAITALL 0 #endif -/* - * Some older systems seem not to have MAXHOSTNAMELEN - * defined. - */ -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 254 -#endif - #ifndef INADDR_LOOPBACK #define INADDR_LOOPBACK 0x7f000001 #endif