Skip to content

Commit

Permalink
Gate BIO_new_socket in OPENSSL_NO_SOCK in handwritten bindings
Browse files Browse the repository at this point in the history
OpenSSL conditions the availability of this symbol on OPENSSL_NO_SOCK.
Match that in the handwritten bindings.

This doesn't really matter as it's only in the handwritten bindings and
not used by rust-openssl, but we may as well make it match OpenSSL.
  • Loading branch information
davidben committed Jul 24, 2023
1 parent 99bce5b commit c8b6077
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions openssl-sys/build/expando.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,10 @@ RUST_CONF_OPENSSL_NO_SSL3_METHOD
RUST_CONF_OPENSSL_NO_TLSEXT
#endif

#ifdef OPENSSL_NO_SOCK
RUST_CONF_OPENSSL_NO_SOCK
#endif

#ifdef OPENSSL_NO_STDIO
RUST_CONF_OPENSSL_NO_STDIO
#endif
Expand Down
1 change: 1 addition & 0 deletions openssl-sys/src/handwritten/bio.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ const_ptr_api! {
}

extern "C" {
#[cfg(not(osslconf = "OPENSSL_NO_SOCK"))]
pub fn BIO_new_socket(sock: c_int, close_flag: c_int) -> *mut BIO;

#[cfg(any(ossl110, libressl273))]
Expand Down

0 comments on commit c8b6077

Please sign in to comment.