Add defaults for NETDB_{INTERNAL,SUCESS}.

NETDB_INTERNAL and NETDB_SUCCESS are not defined by POSIX, so some
libc implementations (such as musl) do not have them. When compiling
sockets contrib, check if these are defined and, if not, define them to
be zero.
This commit is contained in:
Eric Timmons 2016-02-24 21:48:57 -05:00
parent 9c3f55fe36
commit 6eede933dd

View file

@ -1429,6 +1429,15 @@ ecl_make_stream_from_fd(#0,#1,(enum ecl_smmode)#2,
"#define NETDB_INTERNAL WSAEAFNOSUPPORT"
"#define NETDB_SUCCESS 0"
)
(Clines
"#ifndef NETDB_INTERNAL"
"#define NETDB_INTERNAL 0"
"#endif"
"#ifndef NETDB_SUCCESS"
"#define NETDB_SUCCESS 0"
"#endif")
(define-socket-condition EADDRINUSE address-in-use-error)
(define-socket-condition EAGAIN interrupted-error)
(define-socket-condition EBADF bad-file-descriptor-error)