From 3817846c6d1dc8ae1ea97f1f17d8955035df640e Mon Sep 17 00:00:00 2001 From: Oleh Nykyforchyn Date: Sat, 23 Aug 2025 11:31:52 +0300 Subject: [PATCH] xserver: hw/xfree86,include: add a missed ifdef It is patch 1/7 of a series that provides a convenient way to specify IgnoreABI and module search paths on a per-driver basis. It adds #ifdef CONFIG_LEGACY_NVIDIA_PADDING wherever it should be but is missed. Signed-off-by: Oleh Nykyforchyn --- hw/xfree86/loader/loader.c | 7 +++++-- include/xorg-server.h.meson.in | 3 +++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/hw/xfree86/loader/loader.c b/hw/xfree86/loader/loader.c index f2e173c79..a54c7440a 100644 --- a/hw/xfree86/loader/loader.c +++ b/hw/xfree86/loader/loader.c @@ -203,10 +203,13 @@ LoaderGetABIVersion(const char *abiclass) * complexity to the codebase, we will no longer be able to * support both abi's at once. * - * We will probably have to add a compile-time flag that switches + * Therefore we have added a compile-time flag that switches * between abi's. */ - {ABI_CLASS_VIDEODRV, is_nvidia_proprietary ? ABI_NVIDIA_VERSION : + {ABI_CLASS_VIDEODRV, +#ifdef CONFIG_LEGACY_NVIDIA_PADDING + is_nvidia_proprietary ? ABI_NVIDIA_VERSION : +#endif LoaderVersionInfo.videodrvVersion}, {ABI_CLASS_XINPUT, LoaderVersionInfo.xinputVersion}, {ABI_CLASS_EXTENSION, LoaderVersionInfo.extensionVersion}, diff --git a/include/xorg-server.h.meson.in b/include/xorg-server.h.meson.in index 07e7e64e5..1a58b0f49 100644 --- a/include/xorg-server.h.meson.in +++ b/include/xorg-server.h.meson.in @@ -38,6 +38,9 @@ /* Support XDM-AUTH*-1 */ #mesondefine HASXDMAUTH +/* Add a padding for legacy nvidia drivers that support old ABI */ +#mesondefine CONFIG_LEGACY_NVIDIA_PADDING + /* Define to 1 if you have the `reallocarray' function. */ #mesondefine HAVE_REALLOCARRAY