Browse Source

deps/glad: Fix build with GCC-10

GCC-10 defaults to '-fno-common' [1], which triggers issues with
defining global variables multiple times.  To fix the build, use
'extern' to turn the first definition of 'gladGetProcAddressPtr'
into a declaration.

1. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85678

Closes https://github.com/obsproject/obs-studio/issues/2828
Jimi Huotari 5 years ago
parent
commit
c7f84f8fc4
1 changed files with 1 additions and 1 deletions
  1. 1 1
      deps/glad/src/glad_glx.c

+ 1 - 1
deps/glad/src/glad_glx.c

@@ -35,7 +35,7 @@ static void* libGL;
 
 #ifndef __APPLE__
 typedef void* (APIENTRYP PFNGLXGETPROCADDRESSPROC_PRIVATE)(const char*);
-PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
+extern PFNGLXGETPROCADDRESSPROC_PRIVATE gladGetProcAddressPtr;
 #endif
 
 static