--- video/out/opengl/utils.c.orig
+++ video/out/opengl/utils.c
@@ -999,6 +999,7 @@ void gl_sc_gen_shader_and_reset(struct g
     gl_sc_reset(sc);
 }
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 // Maximum number of simultaneous query objects to keep around. Reducing this
 // number might cause rendering to block until the result of a previous query is
 // available
@@ -1124,6 +1125,7 @@ void gl_timer_stop(struct gl_timer *time
     if (gl->EndQuery)
         gl->EndQuery(GL_TIME_ELAPSED);
 }
+#endif
 
 // Upload a texture, going through a PBO. PBO supposedly can facilitate
 // asynchronous copy from CPU to GPU, so this is an optimization. Note that
--- video/out/opengl/utils.h.orig
+++ video/out/opengl/utils.h
@@ -19,6 +19,10 @@
 #ifndef MP_GL_UTILS_
 #define MP_GL_UTILS_
 
+#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+#endif
+
 #include "common.h"
 #include "math.h"
 
@@ -170,6 +174,7 @@ void gl_sc_enable_extension(struct gl_sh
 void gl_sc_gen_shader_and_reset(struct gl_shader_cache *sc);
 void gl_sc_reset(struct gl_shader_cache *sc);
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 struct gl_timer;
 
 struct gl_timer *gl_timer_create(GL *gl);
@@ -181,6 +186,7 @@ int gl_timer_sample_count(struct gl_time
 uint64_t gl_timer_last_us(struct gl_timer *timer);
 uint64_t gl_timer_avg_us(struct gl_timer *timer);
 uint64_t gl_timer_peak_us(struct gl_timer *timer);
+#endif
 
 struct gl_pbo_upload {
     GL *gl;
--- video/out/opengl/video.c.orig
+++ video/out/opengl/video.c
@@ -192,9 +192,11 @@ struct gl_video {
     GLuint dither_texture;
     int dither_size;
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     struct gl_timer *upload_timer;
     struct gl_timer *render_timer;
     struct gl_timer *present_timer;
+#endif
 
     struct mp_image_params real_image_params;   // configured format
     struct mp_image_params image_params;        // texture format (mind hwdec case)
@@ -2407,7 +2409,9 @@ static void pass_render_frame(struct gl_
     // start the render timer here. it will continue to the end of this
     // function, to render the time needed to draw (excluding screen
     // presentation)
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_start(p->render_timer);
+#endif
 
     p->use_linear = p->opts.linear_scaling || p->opts.sigmoid_upscaling;
     pass_read_video(p);
@@ -2466,12 +2470,16 @@ static void pass_render_frame(struct gl_
 
     pass_opt_hook_point(p, "SCALED", NULL);
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_stop(p->render_timer);
+#endif
 }
 
 static void pass_draw_to_screen(struct gl_video *p, int fbo)
 {
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_start(p->present_timer);
+#endif
 
     if (p->dumb_mode)
         pass_render_frame_dumb(p, fbo);
@@ -2498,7 +2506,9 @@ static void pass_draw_to_screen(struct g
     pass_dither(p);
     finish_pass_direct(p, fbo, p->vp_w, p->vp_h, &p->dst_rect);
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_stop(p->present_timer);
+#endif
 }
 
 // Draws an interpolate frame to fbo, based on the frame timing in t
@@ -2677,6 +2687,7 @@ static void gl_video_interpolate_frame(s
     p->frames_drawn += 1;
 }
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 static void timer_dbg(struct gl_video *p, const char *name, struct gl_timer *t)
 {
     if (gl_timer_sample_count(t) > 0) {
@@ -2686,6 +2697,7 @@ static void timer_dbg(struct gl_video *p
                (int)gl_timer_peak_us(t));
     }
 }
+#endif
 
 // (fbo==0 makes BindFramebuffer select the screen backbuffer)
 void gl_video_render_frame(struct gl_video *p, struct vo_frame *frame, int fbo)
@@ -2798,10 +2810,12 @@ done:
 
     p->frames_rendered++;
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     // Report performance metrics
     timer_dbg(p, "upload", p->upload_timer);
     timer_dbg(p, "render", p->render_timer);
     timer_dbg(p, "present", p->present_timer);
+#endif
 }
 
 // vp_w/vp_h is the implicit size of the target framebuffer.
@@ -2823,6 +2837,7 @@ void gl_video_resize(struct gl_video *p,
         mpgl_osd_resize(p->osd, p->osd_rect, p->image_params.stereo_out);
 }
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 static struct voctrl_performance_entry gl_video_perfentry(struct gl_timer *t)
 {
     return (struct voctrl_performance_entry) {
@@ -2840,6 +2855,7 @@ struct voctrl_performance_data gl_video_
         .present = gl_video_perfentry(p->present_timer),
     };
 }
+#endif
 
 // This assumes nv12, with textures set to GL_NEAREST filtering.
 static void reinterleave_vdpau(struct gl_video *p, struct gl_hwdec_frame *frame)
@@ -2903,9 +2919,13 @@ static bool gl_video_upload_image(struct
     if (p->hwdec_active) {
         // Hardware decoding
         struct gl_hwdec_frame gl_frame = {{0}};
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
         gl_timer_start(p->upload_timer);
+#endif
         bool ok = p->hwdec->driver->map_frame(p->hwdec, vimg->mpi, &gl_frame) >= 0;
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
         gl_timer_stop(p->upload_timer);
+#endif
         vimg->hwdec_mapped = true;
         if (ok) {
             struct mp_image layout = {0};
@@ -2935,7 +2955,9 @@ static bool gl_video_upload_image(struct
     // Software decoding
     assert(mpi->num_planes == p->plane_count);
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_start(p->upload_timer);
+#endif
 
 
     for (int n = 0; n < p->plane_count; n++) {
@@ -2951,7 +2973,9 @@ static bool gl_video_upload_image(struct
         gl->BindTexture(plane->gl_target, 0);
     }
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_stop(p->upload_timer);
+#endif
 
     return true;
 
@@ -3188,9 +3212,11 @@ static void init_gl(struct gl_video *p)
         gl->BindFramebuffer(GL_FRAMEBUFFER, 0);
     }
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     p->upload_timer = gl_timer_create(p->gl);
     p->render_timer = gl_timer_create(p->gl);
     p->present_timer = gl_timer_create(p->gl);
+#endif
 
     debug_check_gl(p, "after init_gl");
 }
@@ -3210,9 +3236,11 @@ void gl_video_uninit(struct gl_video *p)
 
     gl->DeleteTextures(1, &p->lut_3d_texture);
 
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
     gl_timer_free(p->upload_timer);
     gl_timer_free(p->render_timer);
     gl_timer_free(p->present_timer);
+#endif
 
     mpgl_osd_destroy(p->osd);
 
--- video/out/opengl/video.h.orig
+++ video/out/opengl/video.h
@@ -20,6 +20,10 @@
 
 #include <stdbool.h>
 
+#ifdef __APPLE__
+#include <AvailabilityMacros.h>
+#endif
+
 #include "options/m_option.h"
 #include "sub/osd.h"
 #include "common.h"
@@ -158,7 +162,9 @@ void gl_video_render_frame(struct gl_vid
 void gl_video_resize(struct gl_video *p, int vp_w, int vp_h,
                      struct mp_rect *src, struct mp_rect *dst,
                      struct mp_osd_res *osd);
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
 struct voctrl_performance_data gl_video_perfdata(struct gl_video *p);
+#endif
 struct mp_csp_equalizer;
 struct mp_csp_equalizer *gl_video_eq_ptr(struct gl_video *p);
 void gl_video_eq_update(struct gl_video *p);
--- video/out/vo_opengl.c.orig
+++ video/out/vo_opengl.c
@@ -349,7 +349,9 @@ static int control(struct vo *vo, uint32
         }
         return true;
     case VOCTRL_PERFORMANCE_DATA:
+#if !defined(__APPLE__) || MAC_OS_X_VERSION_MAX_ALLOWED >= 1070
         *(struct voctrl_performance_data *)data = gl_video_perfdata(p->renderer);
+#endif
         return true;
     }
 
