Unverified Commit c5ec56a2 authored by Steven Fackler's avatar Steven Fackler
Browse files

even more fixes

parent ada2c0b9
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -265,7 +265,9 @@ jobs:
            make
            make install_sw
          if: matrix.library.version != 'vendored' && !steps.openssl-cache.outputs.cache-hit
        - run: echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV
        - run: |
            echo "RUST_TEST_THREADS=1" >> $GITHUB_ENV
            echo BINDGEN_EXTRA_CLANG_ARGS="--sysroot /usr/arm-linux-gnueabi" >> $GITHUB_ENV
          if: matrix.target == 'arm-unknown-linux-gnueabihf'
        - uses: actions/cache@v1
          with:
+2 −1
Original line number Diff line number Diff line
@@ -79,7 +79,8 @@ impl ParseCallbacks for OpensslCallbacks {
            | "BIO_meth_set_puts"
            | "BIO_meth_set_ctrl"
            | "BIO_meth_set_create"
            | "BIO_meth_set_destroy" => Some(format!("{}__fixed_rust", original_item_name)),
            | "BIO_meth_set_destroy"
            | "CRYPTO_set_locking_callback" => Some(format!("{}__fixed_rust", original_item_name)),
            _ => None,
        }
    }
+0 −40
Original line number Diff line number Diff line
@@ -65,43 +65,3 @@ extern "C" {
        destroy: unsafe extern "C" fn(*mut BIO) -> c_int,
    ) -> c_int;
}

#[allow(clashing_extern_declarations)]
extern "C" {
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_write"]
    pub fn BIO_meth_set_write__fixed_rust(
        biom: *mut BIO_METHOD,
        write: Option<unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_read"]
    pub fn BIO_meth_set_read__fixed_rust(
        biom: *mut BIO_METHOD,
        read: Option<unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_puts"]
    pub fn BIO_meth_set_puts__fixed_rust(
        biom: *mut BIO_METHOD,
        read: Option<unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_ctrl"]
    pub fn BIO_meth_set_ctrl__fixed_rust(
        biom: *mut BIO_METHOD,
        read: Option<unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_create"]
    pub fn BIO_meth_set_create__fixed_rust(
        biom: *mut BIO_METHOD,
        create: Option<unsafe extern "C" fn(*mut BIO) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_destroy"]
    pub fn BIO_meth_set_destroy__fixed_rust(
        biom: *mut BIO_METHOD,
        destroy: Option<unsafe extern "C" fn(*mut BIO) -> c_int>,
    ) -> c_int;
}
+7 −0
Original line number Diff line number Diff line
use libc::*;
use *;

extern "C" {
    #[cfg(not(ossl110))]
    pub fn CRYPTO_set_locking_callback(
        func: unsafe extern "C" fn(mode: c_int, n: c_int, file: *const c_char, line: c_int),
    );
}

cfg_if! {
    if #[cfg(ossl110)] {
        type CRYPTO_EX_new_ret = ();
+40 −0
Original line number Diff line number Diff line
@@ -65,3 +65,43 @@ extern "C" {
    #[cfg(any(ossl110, libressl273))]
    pub fn BIO_meth_free(biom: *mut BIO_METHOD);
}

#[allow(clashing_extern_declarations)]
extern "C" {
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_write"]
    pub fn BIO_meth_set_write__fixed_rust(
        biom: *mut BIO_METHOD,
        write: Option<unsafe extern "C" fn(*mut BIO, *const c_char, c_int) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_read"]
    pub fn BIO_meth_set_read__fixed_rust(
        biom: *mut BIO_METHOD,
        read: Option<unsafe extern "C" fn(*mut BIO, *mut c_char, c_int) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_puts"]
    pub fn BIO_meth_set_puts__fixed_rust(
        biom: *mut BIO_METHOD,
        read: Option<unsafe extern "C" fn(*mut BIO, *const c_char) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_ctrl"]
    pub fn BIO_meth_set_ctrl__fixed_rust(
        biom: *mut BIO_METHOD,
        read: Option<unsafe extern "C" fn(*mut BIO, c_int, c_long, *mut c_void) -> c_long>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_create"]
    pub fn BIO_meth_set_create__fixed_rust(
        biom: *mut BIO_METHOD,
        create: Option<unsafe extern "C" fn(*mut BIO) -> c_int>,
    ) -> c_int;
    #[cfg(any(ossl110, libressl273))]
    #[link_name = "BIO_meth_set_destroy"]
    pub fn BIO_meth_set_destroy__fixed_rust(
        biom: *mut BIO_METHOD,
        destroy: Option<unsafe extern "C" fn(*mut BIO) -> c_int>,
    ) -> c_int;
}
Loading