Don't include system headers into glad namespace. Fixes build errors with Xcode 12+: error: no member named 'ldiv' in the global namespace; did you mean simply 'ldiv'? error: no member named 'lldiv' in the global namespace; did you mean simply 'lldiv'? https://github.com/love2d/love/commit/6be79bdd89f8b148e250d6ead69d644677a0cd7e --- src/libraries/glad/glad.cpp +++ src/libraries/glad/glad.cpp @@ -1,8 +1,4 @@ #include -#include "glad.hpp" - -namespace glad { - #ifdef GLAD_USE_SDL #include @@ -13,6 +9,10 @@ namespace glad { #include #endif +#include "glad.hpp" + +namespace glad { + bool gladLoadGL(void) { #ifdef GLAD_USE_SDL return gladLoadGLLoader(SDL_GL_GetProcAddress);