xfree86: loader: Ignore abi mismatch for the proprietary nvidia DDX

This is a proprietary DDX driver made by nvidia.
We can't rebuild it against Xlibre, so the abi check would always fail.

Signed-off-by: stefan11111 <stefan11111@shitposting.expert>
This commit is contained in:
stefan11111
2025-11-19 11:02:00 +02:00
committed by Enrico Weigelt
parent 7f575ddc99
commit 3df2ae1c9e
3 changed files with 9 additions and 1 deletions

View File

@@ -148,6 +148,8 @@ LoaderUnload(const char *name, void *handle)
unsigned long LoaderOptions = 0;
Bool is_nvidia_proprietary = FALSE;
void
LoaderSetOptions(unsigned long opts)
{
@@ -157,7 +159,8 @@ LoaderSetOptions(unsigned long opts)
Bool
LoaderShouldIgnoreABI(void)
{
return (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL) != 0;
/* The nvidia proprietary DDX driver calls this deprecated function */
return is_nvidia_proprietary || (LoaderOptions & LDR_OPT_ABI_MISMATCH_NONFATAL);
}
int

View File

@@ -70,6 +70,8 @@ extern const ModuleVersions LoaderVersionInfo;
extern unsigned long LoaderOptions;
extern Bool is_nvidia_proprietary;
/* Internal Functions */
void *LoaderOpen(const char *, int *);

View File

@@ -672,6 +672,9 @@ LoadModule(const char *module, void *options, const XF86ModReqInfo *modreq,
LogMessageVerb(X_INFO, 3, "LoadModule: \"%s\"", module);
/* Ignore abi check for the nvidia proprietary DDX driver */
is_nvidia_proprietary = !memcmp(module, "nvidia", sizeof("nvidia"));
patterns = InitPatterns(NULL);
name = LoaderGetCanonicalName(module, patterns);
noncanonical = (name && strcmp(module, name) != 0);