SDL_opengl: Fix Mac build with new glext.h
authorJørgen P. Tjernø <jorgen@uberent.com>
Wed, 04 Jun 2014 09:59:10 -0700
changeset 8811 3f0b8a86c65b
parent 8810 901ac824a18b
child 8812 b0f96c169c97
SDL_opengl: Fix Mac build with new glext.h
include/SDL_opengl.h
src/render/opengl/SDL_render_gl.c
--- a/include/SDL_opengl.h	Wed Jun 04 09:39:08 2014 -0700
+++ b/include/SDL_opengl.h	Wed Jun 04 09:59:10 2014 -0700
@@ -50,6 +50,7 @@
 #define __glext_h_              /* Don't let gl.h include glext.h */
 #endif
 #if defined(__MACOSX__)
+#include <stddef.h>             /* Needed for ptrdiff_t */
 #include <OpenGL/gl.h>          /* Header File For The OpenGL Library */
 #define __X_GL_H
 #else
--- a/src/render/opengl/SDL_render_gl.c	Wed Jun 04 09:39:08 2014 -0700
+++ b/src/render/opengl/SDL_render_gl.c	Wed Jun 04 09:59:10 2014 -0700
@@ -332,7 +332,7 @@
 }
 
 static void APIENTRY
-GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, void *userParam)
+GL_HandleDebugMessage(GLenum source, GLenum type, GLuint id, GLenum severity, GLsizei length, const char *message, const void *userParam)
 {
     SDL_Renderer *renderer = (SDL_Renderer *) userParam;
     GL_RenderData *data = (GL_RenderData *) renderer->driverdata;