blob: 352ea2c937c7cad406cfcc6402f3ca15e4187791 (
plain)
1 From c7f84f8fc4e90ef779a204ac268f5ee1a962e324 Mon Sep 17 00:00:00 2001
2 From: Jimi Huotari <chiitoo@gentoo.org>
3 Date: Sun, 9 Feb 2020 05:23:55 +0200
4 Subject: [PATCH] deps/glad: Fix build with GCC-10
5
6 GCC-10 defaults to '-fno-common' [1], which triggers issues with
7 defining global variables multiple times. To fix the build, use
8 'extern' to turn the first definition of 'gladGetProcAddressPtr'
9 into a declaration.
10
11 1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678
12
13 Closes https://github.com/obsproject/obs-studio/issues/2828
14 ---
15 deps/glad/src/glad_glx.c | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18 diff --git a/deps/glad/src/glad_glx.c b/deps/glad/src/glad_glx.c
19 index 7c55b9fc01..58086f1039 100644
20 --- a/deps/glad/src/glad_glx.c
21 +++ b/deps/glad/src/glad_glx.c
22 @@ -35,7 +35,7 @@ static void* libGL;
23
24 #ifndef __APPLE__
25 typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
26 -PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
27 +extern PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
28 #endif
29
30 static
|