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:
@@ -1,6 +1,6 @@
|
|||||||
#define _GNU_SOURCE // program_invocation_short_name
|
#define _GNU_SOURCE
|
||||||
#include <dlfcn.h>
|
#include <dlfcn.h>
|
||||||
#include <errno.h> // program_invocation_short_name
|
#include <errno.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#include <pthread.h>
|
#include <pthread.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -15,11 +15,6 @@
|
|||||||
#include "util.h"
|
#include "util.h"
|
||||||
|
|
||||||
__attribute__((constructor)) void nm_init() {
|
__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;
|
char *err;
|
||||||
|
|
||||||
NM_LOG("version: " NM_VERSION);
|
NM_LOG("version: " NM_VERSION);
|
||||||
|
|||||||
Reference in New Issue
Block a user