aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorElias Fleckenstein <eliasfleckenstein@web.de>2021-12-19 17:40:00 +0100
committerElias Fleckenstein <eliasfleckenstein@web.de>2021-12-19 17:40:00 +0100
commit207ea9b245f8b0b31c4f3ca4936371fdb7d92334 (patch)
tree7fc7a4fac074fd10e3cfa1f4d9314a023df05f42
parent125e7eca1a13a4e1ea374e480038e565d74d684b (diff)
downloaddungeon_game-207ea9b245f8b0b31c4f3ca4936371fdb7d92334.tar.xz
Replace dlmopen by dlopenHEADmaster
This makes builds without glibc (e.g. on Alpine linux) possible.
-rw-r--r--Makefile2
-rw-r--r--dungeon.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index 01017e6..01265d2 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
all: dungeon plugins
dungeon: dungeon.c
- cc -g -o dungeon dungeon.c -ldl -D_GNU_SOURCE
+ cc -g -o dungeon dungeon.c -ldl
include plugins/*/Makefile
diff --git a/dungeon.c b/dungeon.c
index d461d64..2a775a2 100644
--- a/dungeon.c
+++ b/dungeon.c
@@ -41,7 +41,7 @@ static void *load_plugin(const char *name)
char library_name[1 + 1 + 7 + 1 + len + 1 + len + 1 + 2 + 1];
sprintf(library_name, "./plugins/%s/%s.so", name, name);
- void *handle = dlmopen(LM_ID_BASE, library_name, RTLD_NOW | RTLD_GLOBAL);
+ void *handle = dlopen(library_name, RTLD_NOW | RTLD_GLOBAL);
if (! handle) {
printf("%s\n", dlerror());