From f7a5614c5da9284456db270c2a658b8be0928589 Mon Sep 17 00:00:00 2001 From: Thomas Petazzoni Date: Fri, 29 Aug 2025 18:13:44 +0200 Subject: [PATCH] package/libfreeglut: fix build with GCC 15.x MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes: /home/thomas/buildroot/buildroot/outputs/all/build/libfreeglut-3.4.0/src/x11/fg_init_x11.c:297:6: error: conflicting types for ‘fgPlatformDestroyContext’; have ‘void(SFG_PlatformDisplay, struct __GLXcontextRec *)’ {aka ‘void(struct tagSFG_PlatformDisplay, struct __GLXcontextRec *)’} 297 | void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext ) No autobuilder failures for this issue. Signed-off-by: Thomas Petazzoni Signed-off-by: Peter Korsgaard --- ...formDestroyContext-prototype-for-C23.patch | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 package/libfreeglut/0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch diff --git a/package/libfreeglut/0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch b/package/libfreeglut/0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch new file mode 100644 index 0000000000..c3aadb87de --- /dev/null +++ b/package/libfreeglut/0002-egl-fix-fgPlatformDestroyContext-prototype-for-C23.patch @@ -0,0 +1,31 @@ +From 6d0178a1c43f94b046e4d5f3dfa7185a398706ae Mon Sep 17 00:00:00 2001 +From: Sam James +Date: Sun, 17 Nov 2024 01:14:26 +0000 +Subject: [PATCH] egl: fix fgPlatformDestroyContext prototype for C23 + +C23 removes unprototyped functions, so this conflicted with the definition +in fg_init_x11.c. + +Bug: https://github.com/freeglut/freeglut/issues/186 + +Upstream: 800772e993a3ceffa01ccf3fca449d3279cde338 +Signed-off-by: Thomas Petazzoni +--- + src/egl/fg_init_egl.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/egl/fg_init_egl.h b/src/egl/fg_init_egl.h +index 592c5221..8753dc0b 100644 +--- a/src/egl/fg_init_egl.h ++++ b/src/egl/fg_init_egl.h +@@ -28,6 +28,6 @@ + + extern void fghPlatformInitializeEGL(); + extern void fghPlatformCloseDisplayEGL(); +-extern void fgPlatformDestroyContext(); ++extern void fgPlatformDestroyContext ( SFG_PlatformDisplay pDisplay, SFG_WindowContextType MContext ); + + #endif +-- +2.50.1 +