Unverified Commit 8c7aba73 authored by Noah's avatar Noah
Browse files

Put COMP_get_type behind not(OPENSSL_NO_COMP)

parent 428f140d
Loading
Loading
Loading
Loading
+35 −1
Original line number Diff line number Diff line
@@ -1010,7 +1010,41 @@ cfg_if! {
    }
}

pub enum COMP_CTX {}

cfg_if! {
    if #[cfg(ossl110)] {
        pub enum COMP_METHOD {}
    } else {
        #[repr(C)]
        pub struct COMP_METHOD {
            pub type_: c_int,
            pub name: *const c_char,
            init: Option<unsafe extern "C" fn(*mut COMP_CTX) -> c_int>,
            finish: Option<unsafe extern "C" fn(*mut COMP_CTX)>,
            compress: Option<
                unsafe extern "C" fn(
                    *mut COMP_CTX,
                    *mut c_uchar,
                    c_uint,
                    *mut c_uchar,
                    c_uint,
                ) -> c_int,
            >,
            expand: Option<
                unsafe extern "C" fn(
                    *mut COMP_CTX,
                    *mut c_uchar,
                    c_uint,
                    *mut c_uchar,
                    c_uint,
                ) -> c_int,
            >,
            ctrl: Option<unsafe extern "C" fn() -> c_long>,
            callback_ctrl: Option<unsafe extern "C" fn() -> c_long>,
        }
    }
}

cfg_if! {
    if #[cfg(any(ossl110, libressl280))] {
+2 −0
Original line number Diff line number Diff line
@@ -1348,7 +1348,9 @@ cfg_if! {
    }
}

#[cfg(not(osslconf = "OPENSSL_NO_COMP"))]
extern "C" {
    #[cfg(ossl110)]
    pub fn COMP_get_type(meth: *const COMP_METHOD) -> i32;
}