diff --git a/crypto/http/http_lib.c b/crypto/http/http_lib.c index d753892300207..780363b3259ed 100644 --- a/crypto/http/http_lib.c +++ b/crypto/http/http_lib.c @@ -14,7 +14,12 @@ #include /* for BIO_snprintf() */ #include #include "internal/cryptlib.h" /* for ossl_assert() */ -#include "internal/bio_addr.h" /* for NI_MAXHOST */ +#ifndef OPENSSL_NO_SOCK +# include "internal/bio_addr.h" /* for NI_MAXHOST */ +#endif +#ifndef NI_MAXHOST +# define NI_MAXHOST 255 +#endif #include "crypto/ctype.h" /* for ossl_isspace() */ static void init_pstring(char **pstr)