From 767c9301a8d0e439fab2758a9760483454ce1537 Mon Sep 17 00:00:00 2001 From: Nathan Ricci Date: Thu, 22 Sep 2022 20:57:18 -0400 Subject: [PATCH] Exposed malloc_size on bsd Move malloc_size down one level. --- src/unix/bsd/apple/mod.rs | 2 ++ src/unix/bsd/mod.rs | 1 + 2 files changed, 3 insertions(+) diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index ead06daa36695..9c13cca9ddad6 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -5789,6 +5789,8 @@ extern "C" { attrBufSize: ::size_t, options: u64, ) -> ::c_int; + + pub fn malloc_size(ptr: *const ::c_void) -> ::size_t; } pub unsafe fn mach_task_self() -> ::mach_port_t { diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 20e203bde37b0..204e87a61c107 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -884,6 +884,7 @@ extern "C" { pub fn srand48(seed: ::c_long); pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; pub fn lcong48(p: *mut ::c_ushort); + } cfg_if! {