From 54c996274f951a30abba8d9b897fb61ec6466018 Mon Sep 17 00:00:00 2001 From: "Enrico Weigelt, metux IT consult" Date: Tue, 10 Feb 2026 17:15:12 +0100 Subject: [PATCH] dri2: fix declaration after label error (*BSD) BSD compilers dont like declarations directly following labels (eg. within a switch/case statement), thus we need to scrope those. Signed-off-by: Enrico Weigelt, metux IT consult --- Xext/dri2/dri2.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Xext/dri2/dri2.c b/Xext/dri2/dri2.c index 3dd59c79fd..65b90ad0a3 100644 --- a/Xext/dri2/dri2.c +++ b/Xext/dri2/dri2.c @@ -203,11 +203,15 @@ DRI2GetDrawable(DrawablePtr pDraw) { switch (pDraw->type) { case DRAWABLE_WINDOW: + { WindowPtr pWin = (WindowPtr) pDraw; return dixLookupPrivate(&pWin->devPrivates, &dri2WindowPrivateKeyRec); + } case DRAWABLE_PIXMAP: + { PixmapPtr pPixmap = (PixmapPtr) pDraw; return dixLookupPrivate(&pPixmap->devPrivates, &dri2PixmapPrivateKeyRec); + } default: return NULL; }