diff -Naur a/video/out/opengl/context_rpi.c b/video/out/opengl/context_rpi.c --- a/video/out/opengl/context_rpi.c 2023-01-28 16:49:47.000000000 +0000 +++ b/video/out/opengl/context_rpi.c 2023-02-11 05:14:58.000000000 +0000 @@ -29,6 +29,14 @@ #include "context.h" #include "egl_helpers.h" +#ifdef EGL_CAST +typedef struct { + DISPMANX_ELEMENT_HANDLE_T element; + int width; + int height; +} EGL_DISPMANX_WINDOW_T; +#endif + struct priv { struct GL gl; DISPMANX_DISPLAY_HANDLE_T display; diff -Naur a/video/out/vo_rpi.c b/video/out/vo_rpi.c --- a/video/out/vo_rpi.c 2023-01-28 16:49:47.000000000 +0000 +++ b/video/out/vo_rpi.c 2023-02-11 05:14:59.000000000 +0000 @@ -46,6 +46,14 @@ #include "opengl/ra_gl.h" #include "gpu/video.h" +#ifdef EGL_CAST +typedef struct { + DISPMANX_ELEMENT_HANDLE_T element; + int width; + int height; +} EGL_DISPMANX_WINDOW_T; +#endif + struct mp_egl_rpi { struct mp_log *log; struct GL *gl;