diff --git a/libavutil/hwcontext_opencl.h b/libavutil/hwcontext_opencl.h
index 8e34df44cd2e34994de2c59874f434b38da77694..ef54486c95f004aeccdd09404c6c3b4507924ff4 100644
--- a/libavutil/hwcontext_opencl.h
+++ b/libavutil/hwcontext_opencl.h
@@ -19,7 +19,11 @@
 #ifndef AVUTIL_HWCONTEXT_OPENCL_H
 #define AVUTIL_HWCONTEXT_OPENCL_H
 
+#ifdef __APPLE__
+#include <OpenCL/cl.h>
+#else
 #include <CL/cl.h>
+#endif
 
 #include "frame.h"