From 3a9c3f3fb757dd04b8ac44c575c65dda6bae054b Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 29 May 2012 10:08:25 +0200 Subject: include/c: move fallback for MAXHOSTNAMELEN to c.h Reported-by: Thomas Schwinge Signed-off-by: Karel Zak --- include/c.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'include/c.h') diff --git a/include/c.h b/include/c.h index 8c8db7332..40d289bf7 100644 --- a/include/c.h +++ b/include/c.h @@ -222,6 +222,17 @@ static inline int dirfd(DIR *d) #define IUTF8 0040000 #endif +/* + * Fallback for MAXHOSTNAMELEN + */ +#ifndef MAXHOSTNAMELEN +# ifdef HOST_NAME_MAX +# define MAXHOSTNAMELEN HOST_NAME_MAX +# else +# define MAXHOSTNAMELEN 64 +# endif +#endif + /* * Constant strings for usage() functions. For more info see * Documentation/howto-usage-function.txt and sys-utils/arch.c -- cgit v1.2.3-55-g7522