From a34fe98c7279869b7db6dc4a9f105066b3408865 Mon Sep 17 00:00:00 2001
From: "Ryan C. Gordon" <[EMAIL REDACTED]>
Date: Sun, 26 Oct 2025 15:15:00 -0400
Subject: [PATCH] audio: Don't pack SDL_AudioCVT on Windows.
(this was originally added for Windows, years ago, but I think gcc/clang have
since sorted out their packing issues. We'll revisit if there's some scenario
where it doesn't.)
Fixes #494.
---
include/SDL2/SDL_audio.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/include/SDL2/SDL_audio.h b/include/SDL2/SDL_audio.h
index 77d69dd..384e5ef 100644
--- a/include/SDL2/SDL_audio.h
+++ b/include/SDL2/SDL_audio.h
@@ -211,7 +211,7 @@ typedef void (SDLCALL * SDL_AudioFilter) (struct SDL_AudioCVT * cvt,
* set both its (buf) field to a pointer that is aligned to 16 bytes, and its
* (len) field to something that's a multiple of 16, if possible.
*/
-#if defined(__GNUC__) && !defined(__CHERI_PURE_CAPABILITY__)
+#if defined(__GNUC__) && !defined(_WIN32) && !defined(__CHERI_PURE_CAPABILITY__)
/* This structure is 84 bytes on 32-bit architectures, make sure GCC doesn't
pad it out to 88 bytes to guarantee ABI compatibility between compilers.
This is not a concern on CHERI architectures, where pointers must be stored