From 6eede933dd69d41cfb2b6069c3c7d0b5132efc92 Mon Sep 17 00:00:00 2001 From: Eric Timmons Date: Wed, 24 Feb 2016 21:48:57 -0500 Subject: [PATCH] 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. --- contrib/sockets/sockets.lisp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/sockets/sockets.lisp b/contrib/sockets/sockets.lisp index 60f44bb77..609d0451c 100755 --- a/contrib/sockets/sockets.lisp +++ b/contrib/sockets/sockets.lisp @@ -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) -- GitLab