From 7c7d9c458a207474021b0713250cda4e249e8d42 Mon Sep 17 00:00:00 2001 From: Jasper Bekkers Date: Thu, 22 Feb 2024 14:34:28 +0100 Subject: [PATCH] Add aligned_realloc (backport ) (cherry picked from commit d67af7940ae59e9df58924f0e66bd0908d2b91cb) --- libc-test/semver/windows.txt | 1 + src/windows/mod.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/libc-test/semver/windows.txt b/libc-test/semver/windows.txt index de7aea0e91a4d..db55da5f4e48d 100644 --- a/libc-test/semver/windows.txt +++ b/libc-test/semver/windows.txt @@ -150,6 +150,7 @@ accept access aligned_free aligned_malloc +aligned_realloc atexit atof atoi diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 2270e7078c966..37395dddc3fa3 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -520,6 +520,9 @@ extern "C" { pub fn aligned_malloc(size: size_t, alignment: size_t) -> *mut c_void; #[link_name = "_aligned_free"] pub fn aligned_free(ptr: *mut ::c_void); + #[link_name = "_aligned_realloc"] + pub fn aligned_realloc(memblock: *mut ::c_void, size: size_t, alignment: size_t) + -> *mut c_void; #[link_name = "_putenv"] pub fn putenv(envstring: *const ::c_char) -> ::c_int; #[link_name = "_wputenv"]