From 275fdf709deb8899b8ef620f723a59283cfcb03e Mon Sep 17 00:00:00 2001 From: "duncan.hopkins" Date: Fri, 27 Oct 2023 10:12:59 +0100 Subject: [PATCH] egl: MacOS platform guard around pthread_condattr_setclock() This patch disabled the call to pthread_condattr_setclock on MacOS/Apple platforms. This funciton is missing from the the Xcode pthread implemetation. Acked-By: Mike Blumenkrantz Part-of: --- src/egl/drivers/dri2/egl_dri2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/egl/drivers/dri2/egl_dri2.c b/src/egl/drivers/dri2/egl_dri2.c index df410f08714..2773df1ef89 100644 --- a/src/egl/drivers/dri2/egl_dri2.c +++ b/src/egl/drivers/dri2/egl_dri2.c @@ -3335,6 +3335,7 @@ dri2_create_sync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list) goto fail; } +#if !defined(__APPLE__) && !defined(__MACOSX) /* change clock attribute to CLOCK_MONOTONIC */ ret = pthread_condattr_setclock(&attr, CLOCK_MONOTONIC); @@ -3342,6 +3343,7 @@ dri2_create_sync(_EGLDisplay *disp, EGLenum type, const EGLAttrib *attrib_list) _eglError(EGL_BAD_ACCESS, "eglCreateSyncKHR"); goto fail; } +#endif ret = pthread_cond_init(&dri2_sync->cond, &attr);