Reflect OPENSSL_NO_SOCK and OPENSSL_NO_POSIX_IO into headers Like OPENSSL_NO_FILESYSTEM, keep us honest: if the symbol is missing, don't declare it in the headers. This ensures folks aren't relying on dead code elimination and then later break when they build in a context where it doesn't happen. Bug: 629 Change-Id: I3e56c3879e970aa8d0d6e0e5f1ad046d0f420ef0 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/61730 Reviewed-by: Bob Beck <bbe@google.com> Commit-Queue: David Benjamin <davidben@google.com>
diff --git a/ssl/ssl_lib.cc b/ssl/ssl_lib.cc index 26ffd50..5a2ac2a 100644 --- a/ssl/ssl_lib.cc +++ b/ssl/ssl_lib.cc
@@ -1595,6 +1595,7 @@ return ret; } +#if !defined(OPENSSL_NO_SOCK) int SSL_set_fd(SSL *ssl, int fd) { BIO *bio = BIO_new(BIO_s_socket()); if (bio == NULL) { @@ -1644,6 +1645,7 @@ } return 1; } +#endif // !OPENSSL_NO_SOCK static size_t copy_finished(void *out, size_t out_len, const uint8_t *in, size_t in_len) {