We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4b8632b commit ee12e30Copy full SHA for ee12e30
1 file changed
src/loaders/dyn_load.c
@@ -1,15 +1,27 @@
1
#include "dyn_load.h"
2
3
-#ifdef __unix__
+#if defined(__unix__) || defined(__APPLE__)
4
5
#include <dlfcn.h>
6
+#include <stddef.h>
7
+#include <err.h>
8
9
void *ga_load_library(const char *name) {
- return dlopen(name, RTLD_LAZY|RTLD_LOCAL);
10
+ void *res = dlopen(name, RTLD_LAZY|RTLD_LOCAL);
11
+#ifdef DEBUG
12
+ if (res == NULL)
13
+ warn("dlopen: %s", name);
14
+#endif
15
+ return res;
16
}
17
18
void *ga_func_ptr(void *h, const char *name) {
- return dlsym(h, name);
19
+ void *res = dlsym(h, name);
20
21
22
+ warn("dlsym: %s", name);
23
24
25
26
27
#else
0 commit comments