Skip to content

Commit 5ec86c3

Browse files
crisdosaygoclaude
andcommitted
Fix Linux build: unsafe extern block for Rust 2024
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent fae7113 commit 5ec86c3

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

crates/crypto/src/linux.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,13 +144,17 @@ pub fn aes_gcm_decrypt(key: &[u8; KEY_LEN], nonce: &[u8], ciphertext_and_tag: &[
144144

145145
// ── OpenSSL FFI ────────────────────────────────────────────────────
146146

147+
#[allow(non_camel_case_types)]
147148
type EVP_CIPHER_CTX = c_void;
149+
#[allow(non_camel_case_types)]
148150
type EVP_CIPHER = c_void;
151+
#[allow(non_camel_case_types)]
149152
type EVP_MD = c_void;
153+
#[allow(non_camel_case_types)]
150154
type ENGINE = c_void;
151155

152156
#[link(name = "crypto")]
153-
extern "C" {
157+
unsafe extern "C" {
154158
fn RAND_bytes(buf: *mut u8, num: i32) -> i32;
155159
fn EVP_sha256() -> *const EVP_MD;
156160
fn PKCS5_PBKDF2_HMAC(

0 commit comments

Comments
 (0)