Eliminate unnecessary includes from low-level crypto modules. Beyond generally eliminating unnecessary includes, eliminate as many includes of headers that declare/define particularly error-prone functionality like strlen, malloc, and free. crypto/err/internal.h was added to remove the dependency on openssl/thread.h from the public openssl/err.h header. The include of <stdlib.h> in openssl/mem.h was retained since it defines OPENSSL_malloc and friends as macros around the stdlib.h functions. The public x509.h, x509v3.h, and ssl.h headers were not changed in order to minimize breakage of source compatibility with external code. Change-Id: I0d264b73ad0a720587774430b2ab8f8275960329 Reviewed-on: https://boringssl-review.googlesource.com/4220 Reviewed-by: Adam Langley <agl@google.com>
diff --git a/crypto/directory_win.c b/crypto/directory_win.c index 2e4600f..4ebacf2 100644 --- a/crypto/directory_win.c +++ b/crypto/directory_win.c
@@ -41,6 +41,9 @@ #define NAME_MAX 255 #endif +#include <openssl/mem.h> + + struct OPENSSL_dir_context_st { WIN32_FIND_DATA ctx; HANDLE handle;