Skip to content
Commit 9ca9e077 authored by Paul Sokolovsky's avatar Paul Sokolovsky Committed by Jukka Rissanen
Browse files

net: socket: Define NI_MAXHOST for compatibility



Not in POSIX. Linux man getnameinfo says about it:

"In order to assist the programmer in choosing reasonable sizes for
the supplied buffers, <netdb.h> defines the constants

           #define NI_MAXHOST      1025
           #define NI_MAXSERV      32

Since glibc 2.8, these definitions are exposed only if suitable
feature test macros are defined, namely: _GNU_SOURCE, _DEFAULT_SOURCE
(since glibc 2.19), or (in glibc versions up to and including 2.19)
_BSD_SOURCE or _SVID_SOURCE."

Signed-off-by: default avatarPaul Sokolovsky <paul.sokolovsky@linaro.org>
parent bc618657
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment