diff options
| author | Steven Fackler <[email protected]> | 2018-09-12 20:42:43 -0700 |
|---|---|---|
| committer | Steven Fackler <[email protected]> | 2018-09-12 20:44:22 -0700 |
| commit | 8c6bc774dbf2bcea664579381ac4eb4488044cea (patch) | |
| tree | a6647e797ed0476de45b9ff7b67c5541adf1d43e /openssl-sys/src/bio.rs | |
| parent | Merge pull request #990 from sfackler/one-sys-mod (diff) | |
| download | rust-openssl-8c6bc774dbf2bcea664579381ac4eb4488044cea.tar.xz rust-openssl-8c6bc774dbf2bcea664579381ac4eb4488044cea.zip | |
Support libressl 2.8.0
Closes #988
Diffstat (limited to 'openssl-sys/src/bio.rs')
| -rw-r--r-- | openssl-sys/src/bio.rs | 20 |
1 files changed, 5 insertions, 15 deletions
diff --git a/openssl-sys/src/bio.rs b/openssl-sys/src/bio.rs index ce660145..b6bde933 100644 --- a/openssl-sys/src/bio.rs +++ b/openssl-sys/src/bio.rs @@ -36,7 +36,7 @@ pub type bio_info_cb = Option<unsafe extern "C" fn(*mut BIO, c_int, *const c_char, c_int, c_long, c_long)>; cfg_if! { - if #[cfg(ossl110)] { + if #[cfg(any(ossl110, libressl280))] { pub enum BIO_METHOD {} } else { #[repr(C)] @@ -60,24 +60,14 @@ pub unsafe fn BIO_get_mem_data(b: *mut BIO, pp: *mut *mut c_char) -> c_long { } cfg_if! { - if #[cfg(ossl110)] { + if #[cfg(any(ossl110, libressl280))] { extern "C" { pub fn BIO_s_file() -> *const BIO_METHOD; - } - } else { - extern "C" { - pub fn BIO_s_file() -> *mut BIO_METHOD; - } - } -} -cfg_if! { - if #[cfg(ossl110)] { - extern "C" { pub fn BIO_new(type_: *const BIO_METHOD) -> *mut BIO; } } else { extern "C" { - pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO; + pub fn BIO_s_file() -> *mut BIO_METHOD; } } } @@ -96,7 +86,7 @@ extern "C" { } cfg_if! { - if #[cfg(ossl110)] { + if #[cfg(any(ossl110, libressl280))] { extern "C" { pub fn BIO_s_mem() -> *const BIO_METHOD; } @@ -107,7 +97,7 @@ cfg_if! { } } cfg_if! { - if #[cfg(ossl102)] { + if #[cfg(any(ossl102, libressl280))] { extern "C" { pub fn BIO_new_mem_buf(buf: *const c_void, len: c_int) -> *mut BIO; } |