--- video/out/opengl/common.h.orig
+++ video/out/opengl/common.h
@@ -37,6 +37,10 @@
 #include <windows.h>
 #endif
 
+#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+#endif
+
 struct GL;
 typedef struct GL GL;
 
@@ -188,6 +192,7 @@ struct GL {
 
     void (GLAPIENTRY *InvalidateFramebuffer)(GLenum, GLsizei, const GLenum *);
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     GLsync (GLAPIENTRY *FenceSync)(GLenum, GLbitfield);
     GLenum (GLAPIENTRY *ClientWaitSync)(GLsync, GLbitfield, GLuint64);
     void (GLAPIENTRY *DeleteSync)(GLsync sync);
@@ -202,6 +207,7 @@ struct GL {
     void (GLAPIENTRY *GetQueryObjecti64v)(GLuint, GLenum, GLint64 *);
     void (GLAPIENTRY *GetQueryObjectuiv)(GLuint, GLenum, GLuint *);
     void (GLAPIENTRY *GetQueryObjectui64v)(GLuint, GLenum, GLuint64 *);
+#endif
 
     void (GLAPIENTRY *VDPAUInitNV)(const GLvoid *, const GLvoid *);
     void (GLAPIENTRY *VDPAUFiniNV)(void);
