From a776156b546a9b1a0a6b48ad5b054d1e5cd5cfd1 Mon Sep 17 00:00:00 2001 From: dasha_uwu Date: Fri, 13 Jun 2025 04:49:59 +0500 Subject: [PATCH] treewide: preemptively revert !1714 where it affects ABI compatibility this adds dummy pointers in place of removed fields in some structs, only for SDK headers, to preserve ABI some of these fix segfaults for nvidia driver, some are preemptive Signed-off-by: dasha_uwu --- Xext/xvdix.h | 3 +++ hw/xfree86/dri/dristruct.h | 1 + hw/xfree86/modes/xf86Crtc.h | 2 ++ miext/damage/damagestr.h | 3 +++ miext/shadow/shadow.h | 1 + render/picturestr.h | 3 +++ 6 files changed, 13 insertions(+) diff --git a/Xext/xvdix.h b/Xext/xvdix.h index b7b85380b..853c65e5f 100644 --- a/Xext/xvdix.h +++ b/Xext/xvdix.h @@ -173,6 +173,9 @@ typedef struct { int version, revision; int nAdaptors; XvAdaptorPtr pAdaptors; + void *_dummy1; // required in place of a removed field for ABI compatibility + void *_dummy2; // required in place of a removed field for ABI compatibility + void *_dummy3; // required in place of a removed field for ABI compatibility } XvScreenRec, *XvScreenPtr; extern _X_EXPORT int XvScreenInit(ScreenPtr); diff --git a/hw/xfree86/dri/dristruct.h b/hw/xfree86/dri/dristruct.h index 52dfb7723..2543912bd 100644 --- a/hw/xfree86/dri/dristruct.h +++ b/hw/xfree86/dri/dristruct.h @@ -86,6 +86,7 @@ typedef struct _DRIScreenPrivRec { DrawablePtr fullscreen; /* pointer to fullscreen drawable */ drm_clip_rect_t fullscreen_rect; /* fake rect for fullscreen mode */ DRIWrappedFuncsRec wrap; + void *_dummy1; // required in place of a removed field for ABI compatibility DrawablePtr DRIDrawables[SAREA_MAX_DRAWABLES]; DRIContextPrivPtr dummyCtxPriv; /* Pointer to dummy context */ Bool createDummyCtx; diff --git a/hw/xfree86/modes/xf86Crtc.h b/hw/xfree86/modes/xf86Crtc.h index 4bb4185a6..1eeda5665 100644 --- a/hw/xfree86/modes/xf86Crtc.h +++ b/hw/xfree86/modes/xf86Crtc.h @@ -799,6 +799,8 @@ typedef struct _xf86CrtcConfig { CreateScreenResourcesProcPtr CreateScreenResources; + void *_dummy1; // required in place of a removed field for ABI compatibility + /* Cursor information */ xf86CursorInfoPtr cursor_info; CursorPtr cursor; diff --git a/miext/damage/damagestr.h b/miext/damage/damagestr.h index e041c9efb..5517d24e0 100644 --- a/miext/damage/damagestr.h +++ b/miext/damage/damagestr.h @@ -61,8 +61,11 @@ typedef struct _damageScrPriv { DamagePtr pScreenDamage; CopyWindowProcPtr CopyWindow; + void *_dummy1; // required in place of a removed field for ABI compatibility CreateGCProcPtr CreateGC; + void *_dummy2; // required in place of a removed field for ABI compatibility SetWindowPixmapProcPtr SetWindowPixmap; + void *_dummy3; // required in place of a removed field for ABI compatibility CompositeProcPtr Composite; GlyphsProcPtr Glyphs; AddTrapsProcPtr AddTraps; diff --git a/miext/shadow/shadow.h b/miext/shadow/shadow.h index b80520f77..88587b175 100644 --- a/miext/shadow/shadow.h +++ b/miext/shadow/shadow.h @@ -53,6 +53,7 @@ typedef struct _shadowBuf { /* screen wrappers */ GetImageProcPtr GetImage; + void *_dummy1; // required in place of a removed field for ABI compatibility ScreenBlockHandlerProcPtr BlockHandler; } shadowBufRec; diff --git a/render/picturestr.h b/render/picturestr.h index 2307fc26c..3117b6185 100644 --- a/render/picturestr.h +++ b/render/picturestr.h @@ -294,6 +294,9 @@ typedef struct _PictureScreen { GlyphsProcPtr Glyphs; /* unused */ CompositeRectsProcPtr CompositeRects; + void *_dummy1; // required in place of a removed field for ABI compatibility + void *_dummy2; // required in place of a removed field for ABI compatibility + StoreColorsProcPtr StoreColors; InitIndexedProcPtr InitIndexed;