Skip to content

Commit 0ebf9b7

Browse files
committed
lang/rust: hopefully the last patches for the libcrypto bump
sfackler/rust-openssl#2170
1 parent 27f443a commit 0ebf9b7

3 files changed

+56
-0
lines changed

lang/rust/Makefile

+1
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ COMMENT-src = Rust source component
1616

1717
V = 1.76.0
1818
DISTNAME = rustc-${V}-src
19+
REVISION = 0
1920

2021
# rustc bootstrap version
2122
BV-aarch64 = 1.76.0-20240206
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
https://github.com/sfackler/rust-openssl/pull/2170
2+
3+
Index: vendor/openssl-sys/src/crypto.rs
4+
--- vendor/openssl-sys/src/crypto.rs.orig
5+
+++ vendor/openssl-sys/src/crypto.rs
6+
@@ -57,7 +57,7 @@ pub type CRYPTO_EX_free = unsafe extern "C" fn(
7+
argp: *mut c_void,
8+
);
9+
10+
-#[cfg(ossl110)]
11+
+#[cfg(any(ossl110, libressl390))]
12+
#[inline]
13+
#[track_caller]
14+
pub unsafe fn OPENSSL_malloc(num: usize) -> *mut c_void {
15+
@@ -68,7 +68,7 @@ pub unsafe fn OPENSSL_malloc(num: usize) -> *mut c_voi
16+
)
17+
}
18+
19+
-#[cfg(not(ossl110))]
20+
+#[cfg(not(any(ossl110, libressl390)))]
21+
#[inline]
22+
#[track_caller]
23+
pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_void {
24+
@@ -79,7 +79,7 @@ pub unsafe fn OPENSSL_malloc(num: c_int) -> *mut c_voi
25+
)
26+
}
27+
28+
-#[cfg(ossl110)]
29+
+#[cfg(any(ossl110, libressl390))]
30+
#[inline]
31+
#[track_caller]
32+
pub unsafe fn OPENSSL_free(addr: *mut c_void) {
33+
@@ -90,7 +90,7 @@ pub unsafe fn OPENSSL_free(addr: *mut c_void) {
34+
)
35+
}
36+
37+
-#[cfg(not(ossl110))]
38+
+#[cfg(not(any(ossl110, libressl390)))]
39+
#[inline]
40+
pub unsafe fn OPENSSL_free(addr: *mut c_void) {
41+
CRYPTO_free(addr)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
https://github.com/sfackler/rust-openssl/pull/2170
2+
3+
Index: vendor/openssl-sys/src/handwritten/crypto.rs
4+
--- vendor/openssl-sys/src/handwritten/crypto.rs.orig
5+
+++ vendor/openssl-sys/src/handwritten/crypto.rs
6+
@@ -57,7 +57,7 @@ extern "C" {
7+
}
8+
9+
cfg_if! {
10+
- if #[cfg(ossl110)] {
11+
+ if #[cfg(any(ossl110, libressl390))] {
12+
extern "C" {
13+
pub fn CRYPTO_malloc(num: size_t, file: *const c_char, line: c_int) -> *mut c_void;
14+
pub fn CRYPTO_free(buf: *mut c_void, file: *const c_char, line: c_int);

0 commit comments

Comments
 (0)