diff --git a/Source/CABackingStore.h b/Source/CABackingStore.h index 10693c1..efb4a3c 100644 --- a/Source/CABackingStore.h +++ b/Source/CABackingStore.h @@ -38,8 +38,15 @@ #if GNUSTEP #import #endif -#if (__APPLE__) +/* GL_GLEXT_PROTOTYPES must be defined BEFORE is included so that + * when gl.h transitively pulls in glext.h, the OpenGL 2.0+ prototypes + * (glUseProgram etc.) are declared. Previously this define was inside the + * __APPLE__ branch, so the Linux build of CARenderer.m saw an undefined + * glUseProgram and failed on modern clang (which treats implicit function + * declarations as errors). + */ #define GL_GLEXT_PROTOTYPES 1 +#if (__APPLE__) #import #import #import