1
0

Removed support for loading using LD_PRELOAD (#63)

It hasn't been used except for before the initial release, and it's more likely
to cause odd issues when parts of NM are reused by other mods.
This commit is contained in:
Patrick Gaskin
2020-07-20 18:39:13 -04:00
committed by GitHub
parent fb080e031f
commit 5a6ae2b462

View File

@@ -1,6 +1,6 @@
#define _GNU_SOURCE // program_invocation_short_name
#define _GNU_SOURCE
#include <dlfcn.h>
#include <errno.h> // program_invocation_short_name
#include <errno.h>
#include <link.h>
#include <pthread.h>
#include <stdlib.h>
@@ -15,11 +15,6 @@
#include "util.h"
__attribute__((constructor)) void nm_init() {
// for if it's been loaded with LD_PRELOAD rather than as a Qt plugin
if (strcmp(program_invocation_short_name, "nickel"))
if (!(getenv("LIBNM_FORCE") && !strcmp(getenv("LIBNM_FORCE"), "true")))
return;
char *err;
NM_LOG("version: " NM_VERSION);