-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lang/rust: hopefully the last patches for the libcrypto bump
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
https://github.com/sfackler/rust-openssl/pull/2170 | ||
|
||
Index: vendor/openssl-sys/src/crypto.rs | ||
--- vendor/openssl-sys/src/crypto.rs.orig | ||
+++ vendor/openssl-sys/src/crypto.rs | ||
@@ -57,7 +57,7 @@ pub type CRYPTO_EX_free = unsafe extern "C" fn( | ||
argp: *mut c_void, | ||
); | ||
|
||
-#[cfg(ossl110)] | ||
+#[cfg(any(ossl110, libressl390))] | ||
#[inline] | ||
#[track_caller] | ||
pub unsafe fn OPENSSL_malloc(num: usize) -> *mut c_void { | ||
@@ -68,7 +68,7 @@ pub unsafe fn OPENSSL_malloc(num: usize) -> *mut c_voi | ||
) | ||
} | ||
|
||
-#[cfg(not(ossl110))] | ||
+#[cfg(not(any(ossl110, libressl390)))] | ||
#[inline] | ||
#[track_caller] | ||
pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_void { | ||
@@ -79,7 +79,7 @@ pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_voi | ||
) | ||
} | ||
|
||
-#[cfg(ossl110)] | ||
+#[cfg(any(ossl110, libressl390))] | ||
#[inline] | ||
#[track_caller] | ||
pub unsafe fn OPENSSL_free(addr: *mut c_void) { | ||
@@ -90,7 +90,7 @@ pub unsafe fn OPENSSL_free(addr: *mut c_void) { | ||
) | ||
} | ||
|
||
-#[cfg(not(ossl110))] | ||
+#[cfg(not(any(ossl110, libressl390)))] | ||
#[inline] | ||
pub unsafe fn OPENSSL_free(addr: *mut c_void) { | ||
CRYPTO_free(addr) |
14 changes: 14 additions & 0 deletions
14
lang/rust/patches/patch-vendor_openssl-sys_src_handwritten_crypto_rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
https://github.com/sfackler/rust-openssl/pull/2170 | ||
|
||
Index: vendor/openssl-sys/src/handwritten/crypto.rs | ||
--- vendor/openssl-sys/src/handwritten/crypto.rs.orig | ||
+++ vendor/openssl-sys/src/handwritten/crypto.rs | ||
@@ -57,7 +57,7 @@ extern "C" { | ||
} | ||
|
||
cfg_if! { | ||
- if #[cfg(ossl110)] { | ||
+ if #[cfg(any(ossl110, libressl390))] { | ||
extern "C" { | ||
pub fn CRYPTO_malloc(num: size_t, file: *const c_char, line: c_int) -> *mut c_void; | ||
pub fn CRYPTO_free(buf: *mut c_void, file: *const c_char, line: c_int); |