diff options
author | Adam Langley <agl@google.com> | 2015-01-31 04:08:37 +0300 |
---|---|---|
committer | Adam Langley <agl@google.com> | 2015-02-02 22:14:15 +0300 |
commit | 2b2d66d4094e5c25789ce68310d86192c377c63b (patch) | |
tree | 0037574fca9fad9755016ccc0f8e4ddb0f978a59 /tool | |
parent | efed2210e8e0c6b3db6c63e354f0c9b67673c712 (diff) |
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>
Diffstat (limited to 'tool')
-rw-r--r-- | tool/digest.cc | 2 | ||||
-rw-r--r-- | tool/pkcs12.cc | 1 | ||||
-rw-r--r-- | tool/speed.cc | 2 | ||||
-rw-r--r-- | tool/transport_common.cc | 1 |
4 files changed, 6 insertions, 0 deletions
diff --git a/tool/digest.cc b/tool/digest.cc index e75b168c..f95f4120 100644 --- a/tool/digest.cc +++ b/tool/digest.cc @@ -22,6 +22,7 @@ #include <fcntl.h> #include <limits.h> #include <stdio.h> +#include <string.h> #include <sys/stat.h> #include <sys/types.h> @@ -42,6 +43,7 @@ typedef int ssize_t; #include <openssl/digest.h> + struct close_delete { void operator()(int *fd) { close(*fd); diff --git a/tool/pkcs12.cc b/tool/pkcs12.cc index fca8bb2f..e0133e51 100644 --- a/tool/pkcs12.cc +++ b/tool/pkcs12.cc @@ -21,6 +21,7 @@ #include <errno.h> #include <fcntl.h> #include <stdint.h> +#include <string.h> #include <sys/stat.h> #include <sys/types.h> #if defined(OPENSSL_WINDOWS) diff --git a/tool/speed.cc b/tool/speed.cc index 411f29e4..2df6f901 100644 --- a/tool/speed.cc +++ b/tool/speed.cc @@ -18,6 +18,7 @@ #include <vector> #include <stdint.h> +#include <string.h> #include <time.h> #include <openssl/aead.h> @@ -34,6 +35,7 @@ #include <sys/time.h> #endif + extern "C" { // These values are DER encoded, RSA private keys. extern const uint8_t kDERRSAPrivate2048[]; diff --git a/tool/transport_common.cc b/tool/transport_common.cc index 453ff5e3..c05742e5 100644 --- a/tool/transport_common.cc +++ b/tool/transport_common.cc @@ -19,6 +19,7 @@ #include <errno.h> #include <stdlib.h> +#include <string.h> #include <sys/types.h> #if !defined(OPENSSL_WINDOWS) |