Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.

Commit 21c2eac

Browse files
authored
Merge pull request #3335 from Geod24/dladdr
Fix dladdr definition for Darwin and CRuntime_Musl merged-on-behalf-of: Iain Buclaw <ibuclaw@users.noreply.github.com>
2 parents a34e383 + a62e795 commit 21c2eac

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

src/core/sys/posix/dlfcn.d

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ else version (Darwin)
139139
char* dlerror();
140140
void* dlopen(const scope char*, int);
141141
void* dlsym(void*, const scope char*);
142-
int dladdr(void* addr, Dl_info* info);
142+
int dladdr(scope const void* addr, Dl_info* info);
143143

144144
struct Dl_info
145145
{
@@ -294,6 +294,15 @@ else version (CRuntime_Musl)
294294
const(char)* dlerror();
295295
void* dlopen(const scope char*, int);
296296
void* dlsym(void*, const scope char*);
297+
298+
int dladdr(scope const void *addr, Dl_info *info);
299+
struct Dl_info
300+
{
301+
const(char)* dli_fname;
302+
void* dli_fbase;
303+
const(char)* dli_sname;
304+
void* dli_saddr;
305+
}
297306
}
298307
else version (CRuntime_UClibc)
299308
{

0 commit comments

Comments
 (0)