Fix the missing header issue for OPENSSL_NO_SOCK
Some platforms would not have sys/socket.h, we should guard these
socket related headers with OPENSSL_NO_SOCK.
Bug: 629
Change-Id: I2d7c31ad32d467da46114307fd89c2ba3d41df2c
Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61845
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Bob Beck <bbe@google.com>
Reviewed-by: David Benjamin <davidben@google.com>
diff --git a/crypto/bio/internal.h b/crypto/bio/internal.h
index ea2aa6a..06f88c9 100644
--- a/crypto/bio/internal.h
+++ b/crypto/bio/internal.h
@@ -59,6 +59,7 @@
#include <openssl/base.h>
+#if !defined(OPENSSL_NO_SOCK)
#if !defined(OPENSSL_WINDOWS)
#if defined(OPENSSL_PNACL)
// newlib uses u_short in socket.h without defining it.
@@ -72,6 +73,7 @@
OPENSSL_MSVC_PRAGMA(warning(pop))
typedef int socklen_t;
#endif
+#endif // !OPENSSL_NO_SOCK
#if defined(__cplusplus)
extern "C" {