1 From bb129aac12c5aa6e2dd371244b042baa82aff014 Mon Sep 17 00:00:00 2001
2 From: Purushottam Choudhary <purushottam27.kumar@lge.com>
3 Date: Tue, 8 Oct 2024 11:47:21 +0530
4 Subject: [PATCH] vrend: Fix int-conversion fatal build error with GCC-14
6 Getting below error int conversion during compilation as one the
7 platforms where EGLNativeDisplayType is an int instead of a pointer.
9 | ../git/src/vrend_winsys_egl.c: In function 'virgl_egl_init':
10 | ../git/src/vrend_winsys_egl.c:364:62: error: passing argument 2 of 'egl->funcs.epoxy_eglGetPlatformDisplay' makes pointer from
11 | 364 | (EGLNativeDisplayType)egl->gbm->device, NULL);
12 | | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 | ../git/src/vrend_winsys_egl.c:364:62: note: expected 'void *' but argument is of type 'int'
17 Upstream-Status: Backport [https://gitlab.freedesktop.org/virgl/virglrenderer/-/commit/464deabe4d1bfce6b8f414ab0945d9a62b66ddd4]
19 Signed-off-by: Purushottam Choudhary <purushottam27.kumar@lge.com>
20 Part-of: <https://gitlab.freedesktop.org/virgl/virglrenderer/-/merge_requests/1440>
22 src/vrend_winsys_egl.c | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-)
25 diff --git a/src/vrend_winsys_egl.c b/src/vrend_winsys_egl.c
26 index 9d9f410c..8750f6b2 100644
27 --- a/src/vrend_winsys_egl.c
28 +++ b/src/vrend_winsys_egl.c
29 @@ -361,7 +361,7 @@ struct virgl_egl *virgl_egl_init(EGLNativeDisplayType display_id, bool surfacele
32 egl->egl_display = egl->funcs.eglGetPlatformDisplay(EGL_PLATFORM_GBM_KHR,
33 - (EGLNativeDisplayType)egl->gbm->device, NULL);
34 + (EGLNativeDisplayType*)egl->gbm->device, NULL);