From 60f2d60ef2c347a42fcea2ae9c9d1c05dc3b5835 Mon Sep 17 00:00:00 2001
From: Sergey Fedorov <[EMAIL REDACTED]>
Date: Wed, 14 Aug 2024 03:35:52 +0800
Subject: [PATCH] Unbreak build with gcc on macOS
Closes: https://github.com/libsdl-org/SDL_image/issues/462
(cherry picked from commit 30b30dfa804602423db7450483b973d62d144bb3)
(cherry picked from commit 41ed75f7f04bad20b2d924726668a633eaf155a4)
---
src/IMG_webp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/IMG_webp.c b/src/IMG_webp.c
index 3284df1c..df30eb10 100644
--- a/src/IMG_webp.c
+++ b/src/IMG_webp.c
@@ -71,11 +71,11 @@ static struct {
if (lib.FUNC == NULL) { IMG_SetError("Missing webpdemux.framework"); return -1; }
#endif
-int IMG_InitWEBP()
#ifdef __APPLE__
/* Need to turn off optimizations so weak framework load check works */
__attribute__ ((optnone))
#endif
+int IMG_InitWEBP()
{
if (lib.loaded == 0) {
#if defined(LOAD_WEBP_DYNAMIC) && defined(LOAD_WEBPDEMUX_DYNAMIC)