aboutsummaryrefslogtreecommitdiff
path: root/openssl-sys/src/bio.rs
diff options
context:
space:
mode:
authorSteven Fackler <[email protected]>2018-09-13 14:37:21 -0700
committerGitHub <[email protected]>2018-09-13 14:37:21 -0700
commitb09929fd07808d1dbcc8b9fbdba0d0957f6360d3 (patch)
treebce9f2edb0e22d80c8540fd9654ef0f3bc995419 /openssl-sys/src/bio.rs
parentMerge pull request #990 from sfackler/one-sys-mod (diff)
parentFix missing symbol (diff)
downloadrust-openssl-b09929fd07808d1dbcc8b9fbdba0d0957f6360d3.tar.xz
rust-openssl-b09929fd07808d1dbcc8b9fbdba0d0957f6360d3.zip
Merge pull request #991 from sfackler/libressl-28
Support libressl 2.8.0
Diffstat (limited to 'openssl-sys/src/bio.rs')
-rw-r--r--openssl-sys/src/bio.rs19
1 files changed, 5 insertions, 14 deletions
diff --git a/openssl-sys/src/bio.rs b/openssl-sys/src/bio.rs
index ce660145..8c26fd42 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,23 +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_s_file() -> *mut BIO_METHOD;
pub fn BIO_new(type_: *mut BIO_METHOD) -> *mut BIO;
}
}
@@ -96,7 +87,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 +98,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;
}