After commit c018f5fd29 Fenrir is being switched over to go. If you do not want to be part of the testing process, please switch to master.
This commit is contained in:
1 parent
c018f5fd29
commit
0e50de4c76
1047 files changed
+58364
-63747
No files matched your search
@@ -0,0 +1,19 @@
|
||||
// Copyright (c) 2026 Storm Dragon
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
|
||||
// Private-test preload: simulate failure to load only Enchant, leaving all
|
||||
// other libraries alone. The optional stub exercises missing ABI symbols.
|
||||
#define _GNU_SOURCE
|
||||
#include <dlfcn.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
void *dlopen(const char *filename, int flags) {
|
||||
void *(*realOpen)(const char *, int) = dlsym(RTLD_NEXT, "dlopen");
|
||||
if (!realOpen) return NULL;
|
||||
if (filename && strcmp(filename, "libenchant-2.so.2") == 0) {
|
||||
const char *stubPath = getenv("FENRIR_TEST_ENCHANT_LIBRARY");
|
||||
return stubPath && *stubPath ? realOpen(stubPath, flags) : NULL;
|
||||
}
|
||||
return realOpen(filename, flags);
|
||||
}
|
||||
Reference in new issue
Block a user