Remove string.h from base.h.
Including string.h in base.h causes any file that includes a BoringSSL
header to include string.h. Generally this wouldn't be a problem,
although string.h might slow down the compile if it wasn't otherwise
needed. However, it also causes problems for ipsec-tools in Android
because OpenSSL didn't have this behaviour.
This change removes string.h from base.h and, instead, adds it to each
.c file that requires it.
Change-Id: I5968e50b0e230fd3adf9b72dd2836e6f52d6fb37
Reviewed-on: https://boringssl-review.googlesource.com/3200
Reviewed-by: David Benjamin <davidben@chromium.org>
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/ssl/pqueue/pqueue.c b/ssl/pqueue/pqueue.c
index 4c94355..ecaa139 100644
--- a/ssl/pqueue/pqueue.c
+++ b/ssl/pqueue/pqueue.c
@@ -56,6 +56,8 @@
#include <openssl/pqueue.h>
+#include <string.h>
+
#include <openssl/mem.h>
diff --git a/ssl/test/async_bio.cc b/ssl/test/async_bio.cc
index 88f8e9a..c007ffa 100644
--- a/ssl/test/async_bio.cc
+++ b/ssl/test/async_bio.cc
@@ -15,8 +15,11 @@
#include "async_bio.h"
#include <errno.h>
+#include <string.h>
+
#include <openssl/mem.h>
+
namespace {
extern const BIO_METHOD async_bio_method;
diff --git a/ssl/test/bssl_shim.cc b/ssl/test/bssl_shim.cc
index 19355af..37891b9 100644
--- a/ssl/test/bssl_shim.cc
+++ b/ssl/test/bssl_shim.cc
@@ -22,6 +22,7 @@
#include <unistd.h>
#endif
+#include <string.h>
#include <sys/types.h>
#include <openssl/bio.h>
diff --git a/ssl/test/packeted_bio.cc b/ssl/test/packeted_bio.cc
index 3894d85..93b2164 100644
--- a/ssl/test/packeted_bio.cc
+++ b/ssl/test/packeted_bio.cc
@@ -16,8 +16,11 @@
#include <assert.h>
#include <errno.h>
+#include <string.h>
+
#include <openssl/mem.h>
+
namespace {
extern const BIO_METHOD packeted_bio_method;