Use MAX_HOST_NAME+1 (limits.h) instead of MAXHOSTNAMELEN (sys/param.h
or netdb.h).
This commit is contained in:
@@ -93,8 +93,16 @@
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef MAXHOSTNAMELEN
|
||||
# define MAXHOSTNAMELEN 64
|
||||
#ifndef HOST_NAME_MAX
|
||||
# ifdef MAXHOSTNAMELEN
|
||||
# define HOST_NAME_MAX MAXHOSTNAMELEN
|
||||
# else
|
||||
# ifdef _POSIX_HOST_NAME_MAX
|
||||
# define HOST_NAME_MAX _POSIX_HOST_NAME_MAX
|
||||
# else
|
||||
# define HOST_NAME_MAX 64
|
||||
# endif
|
||||
# endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
Reference in New Issue
Block a user