From 99035d7fa369be695f8b41221a95d73c052c3916 Mon Sep 17 00:00:00 2001 From: Kleis Auke Wolthuizen Date: Wed, 13 Nov 2024 09:57:33 +0100 Subject: [PATCH] emscripten: Lower `max_align_t` from 16 to 8 bytes See: llvm/llvm-project@d1a96e906cc03a95cfd41a1f22bdda92651250c7. --- libc-test/build.rs | 4 ---- src/unix/linux_like/emscripten/align.rs | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/libc-test/build.rs b/libc-test/build.rs index b5a77b8f9327d..6efbbf2bb2ce9 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -2890,10 +2890,6 @@ fn test_emscripten(target: &str) { ty if ty.starts_with("epoll") => true, ty if ty.starts_with("signalfd") => true, - // FIXME: Lowered from 16 to 8 bytes in - // llvm/llvm-project@d1a96e9 - "max_align_t" => true, - // FIXME: The size has been changed due to time64 "utimbuf" | "timeval" | "timespec" | "rusage" | "itimerval" | "sched_param" | "stat" | "stat64" | "shmid_ds" | "msqid_ds" => true, diff --git a/src/unix/linux_like/emscripten/align.rs b/src/unix/linux_like/emscripten/align.rs index b9ea3f39efdf5..015690eedae45 100644 --- a/src/unix/linux_like/emscripten/align.rs +++ b/src/unix/linux_like/emscripten/align.rs @@ -38,9 +38,9 @@ macro_rules! expand_align { } #[allow(missing_debug_implementations)] - #[repr(align(16))] + #[repr(align(8))] pub struct max_align_t { - priv_: [f64; 4] + priv_: [f64; 3] } }