fix(windows): add memset_explicit symbol export for mingw cross-compilation #118
@ -13,6 +13,8 @@ fn main() {
|
||||
.file("memset_s_shim.c")
|
||||
.compile("memset_shim");
|
||||
println!("cargo:rerun-if-changed=memset_s_shim.c");
|
||||
// Explicitly link the shim library
|
||||
println!("cargo:rustc-link-lib=static=memset_shim");
|
||||
}
|
||||
|
||||
tauri_build::build()
|
||||
|
||||
@ -6,7 +6,13 @@
|
||||
|
||||
#include <string.h>
|
||||
|
||||
void memset_explicit(void *dest, int val, size_t n) {
|
||||
#ifdef _WIN32
|
||||
#define EXPORT __declspec(dllexport)
|
||||
#else
|
||||
#define EXPORT
|
||||
#endif
|
||||
|
||||
EXPORT void memset_explicit(void *dest, int val, size_t n) {
|
||||
volatile unsigned char *p = (volatile unsigned char *)dest;
|
||||
while (n--) {
|
||||
*p++ = (unsigned char)val;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user