libnvidia-egl-wayland/0003-Fix-a-declaration-after-code.patch
Stefan Dirsch 205bb60fa5 - 0001-egl-wayland-bump-version-to-1.1.17.patch
0002-Fix-the-include-path-for-drm_fourcc.h.patch
  0003-Fix-a-declaration-after-code.patch
  0004-egl-swap-provide-damage-rectangles-to-wl_surface.patch
  0005-Use-INT32_MAX-for-wl_surface_damage.patch
  0006-egl-wayland-Accept-device-name-from-either-wl_drm-or.patch
  0007-egl-wayland-fix-device-name-case-where-only-wl_drm-e.patch
  0008-Add-ICD-json-file.patch
  0009-egl-wayland-Fix-roundtrip-eating-wl_drm-events-in-ge.patch
  * apply latest fixes including adding ICD json file; related:
    https://github.com/openSUSE/nvidia-driver-G06/issues/26

OBS-URL: https://build.opensuse.org/package/show/X11:XOrg/libnvidia-egl-wayland?expand=0&rev=27
2024-10-07 13:46:32 +00:00

31 lines
1.0 KiB
Diff

From 80ecf7edc4659c580fcd9d752b57bf23ef7399c0 Mon Sep 17 00:00:00 2001
From: Kyle Brenneman <kbrenneman@nvidia.com>
Date: Mon, 26 Aug 2024 09:19:15 -0600
Subject: [PATCH 3/9] Fix a declaration after code.
In wayland-egldisplay.c, move a declaration to the top of the function.
Older versions of C don't allow mixing declarations and code.
---
src/wayland-egldisplay.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/wayland-egldisplay.c b/src/wayland-egldisplay.c
index 4d25cd7..468b32d 100644
--- a/src/wayland-egldisplay.c
+++ b/src/wayland-egldisplay.c
@@ -568,9 +568,10 @@ static void
dmabuf_feedback_check_done(void *data, struct zwp_linux_dmabuf_feedback_v1 *dmabuf_feedback)
{
WlServerProtocols *protocols = (WlServerProtocols *)data;
+ drmDevice *drm_device;
+
(void) dmabuf_feedback;
- drmDevice *drm_device;
assert(getDeviceFromDevId);
if (getDeviceFromDevId(protocols->devId, 0, &drm_device) == 0) {
if (drm_device->available_nodes & (1 << DRM_NODE_RENDER)) {
--
2.43.0