From 3493f391bc8bde4d2f6a7a52f0f3515500ad7e36 Mon Sep 17 00:00:00 2001 From: Gerasim Troeglazov <3dEyes@gmail.com> Date: Wed, 12 Jan 2022 12:12:48 +1000 Subject: [PATCH] libsdl2: fix build for gcc2 #6531 --- .../libsdl2/patches/libsdl2-2.0.20.patchset | 35 ++++++++++++++++--- 1 file changed, 30 insertions(+), 5 deletions(-) diff --git a/media-libs/libsdl2/patches/libsdl2-2.0.20.patchset b/media-libs/libsdl2/patches/libsdl2-2.0.20.patchset index bb0c5445e..5c299eee2 100644 --- a/media-libs/libsdl2/patches/libsdl2-2.0.20.patchset +++ b/media-libs/libsdl2/patches/libsdl2-2.0.20.patchset @@ -1,4 +1,4 @@ -From f26013d7067d1055c8f6750b49c75d9cfea4ca55 Mon Sep 17 00:00:00 2001 +From e6cc4e7f4b8189be55dd3b0e13e54e59f73d7672 Mon Sep 17 00:00:00 2001 From: X512 Date: Thu, 30 Jan 2020 04:01:58 +0900 Subject: libsdl2: Remove BDirectWindow, fix OpenGL handling. @@ -991,7 +991,7 @@ index e221177..c88cb37 100644 2.30.2 -From 71d990864d29f6a4dccd7723c4ee6408dc66d807 Mon Sep 17 00:00:00 2001 +From b23c88239d9a3ee907eebf0b225465d600b8dde7 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 11 Jan 2022 17:15:28 -0500 Subject: RelativeMouseMode: B_KEYBOARD_EVENTS is not needed. @@ -1014,7 +1014,7 @@ index 77259f9..5551e92 100644 2.30.2 -From de84437a44887e1380e4e07759ba7742b8e41d68 Mon Sep 17 00:00:00 2001 +From 7fa278e0623c0da9a50c587703bbcc79726306c7 Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Mon, 15 Nov 2021 16:32:58 +0100 Subject: Implement SDL_SendDropFile for opening files with RefsReceived @@ -1061,7 +1061,7 @@ index b8b9939..215f836 100644 2.30.2 -From c80820bae87aecab8fe8dd2ec68dee43b5118f69 Mon Sep 17 00:00:00 2001 +From 44a98d9a7ef399fa047c35d6ea27915b0288ae6d Mon Sep 17 00:00:00 2001 From: Pascal Abresch Date: Sat, 4 Dec 2021 10:08:01 +0100 Subject: SDL2: implement minimum window size for Haiku @@ -1162,7 +1162,7 @@ index 1d6a3c5..58a85d8 100644 2.30.2 -From b299660543439b2bee65ca29244cd3f1ea0269d7 Mon Sep 17 00:00:00 2001 +From ff9a8fe69d69213b2633d3bc0eb14dbd1836cc72 Mon Sep 17 00:00:00 2001 From: Augustin Cavalier Date: Tue, 11 Jan 2022 17:45:29 -0500 Subject: Only expect BGL_SHARE_CONTEXT on __GNUC__ > 3. @@ -1187,3 +1187,28 @@ index c88cb37..0c7a704 100644 -- 2.30.2 + +From 6371539d891837b999d57efa995fa78beb581c77 Mon Sep 17 00:00:00 2001 +From: Gerasim Troeglazov <3dEyes@gmail.com> +Date: Wed, 12 Jan 2022 11:59:06 +1000 +Subject: Workaround for gcc2 + + +diff --git a/src/stdlib/SDL_string.c b/src/stdlib/SDL_string.c +index 12cc2da..bc46aec 100644 +--- a/src/stdlib/SDL_string.c ++++ b/src/stdlib/SDL_string.c +@@ -34,6 +34,10 @@ + #define va_copy(dst, src) dst = src + #endif + ++#if __GNUC__ == 2 ++#define va_copy(to, from) __va_copy(to, from) ++#endif ++ + #if !defined(HAVE_VSSCANF) || !defined(HAVE_STRTOL) || !defined(HAVE_STRTOUL) || !defined(HAVE_STRTOD) || !defined(HAVE_STRTOLL) || !defined(HAVE_STRTOULL) + #define SDL_isupperhex(X) (((X) >= 'A') && ((X) <= 'F')) + #define SDL_islowerhex(X) (((X) >= 'a') && ((X) <= 'f')) +-- +2.30.2 +