egl-wayland: Fix build with clang

Clang19 reports more errors, fixed thusly

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2024-06-12 17:39:26 -07:00
committed by Matt Madison
parent e499f2c770
commit d8f3d990d0
2 changed files with 41 additions and 0 deletions

View File

@@ -0,0 +1,40 @@
From 49e4da8890560c949a4352397fdd083b7175b1b6 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Wed, 12 Jun 2024 17:32:06 -0700
Subject: [PATCH] wayland-eglsurface: Change type of timout from EGLint ->
EGLTime
This seems to be the appropriate type representation for
timeout, moreover it also fixes an error with newer compilers where
it complains about type mismatch between EGLint and EGL_FOREVER because
EGL_FOREVER is defined as 0xFFFFFFFFFFFFFFFFull which is unsinged long
long.
Fixes
| ../git/src/wayland-eglsurface.c:1591:62: error: implicit conversion from 'unsigned long long' to 'EGLint' (aka 'int') changes value from 18446744073709551615 to -1 [-Werror,]
| 1591 | EGLint timeout = surface->wlSyncobjSurf ? EGL_FOREVER : 0;
| | ~~~~~~~ ^~~~~~~~~~~
| /mnt/b/yoe/master/build/tmp/work/armv8a-yoe-linux/egl-wayland/1.1.13+git/recipe-sysroot/usr/include/EGL/egl.h:293:43: note: expanded from macro 'EGL_FOREVER'
| 293 | #define EGL_FOREVER 0xFFFFFFFFFFFFFFFFull
| | ^~~~~~~~~~~~~~~~~~~~~
| 1 error generated.
Upstream-Status: Submitted [https://github.com/NVIDIA/egl-wayland/pull/112]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
src/wayland-eglsurface.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/wayland-eglsurface.c b/src/wayland-eglsurface.c
index 0c28a4f..4932217 100644
--- a/src/wayland-eglsurface.c
+++ b/src/wayland-eglsurface.c
@@ -1588,7 +1588,7 @@ EGLint wlEglHandleImageStreamEvents(WlEglSurface *surface)
EGLAttrib aux;
EGLenum event;
EGLint err = EGL_SUCCESS;
- EGLint timeout = surface->wlSyncobjSurf ? EGL_FOREVER : 0;
+ EGLTime timeout = surface->wlSyncobjSurf ? EGL_FOREVER : 0;
if (surface->ctx.wlStreamResource) {
/* Not a local stream */

View File

@@ -12,6 +12,7 @@ PV = "1.1.13+git"
SRC_URI += " \
file://0001-Fix-wayland-eglstream-protocols-pc-file.patch \
file://0001-wayland-eglsurface-Change-type-of-timout-from-EGLint.patch \
file://nvidia_wayland.json \
"