add PTHREAD_NULL
[musl.git] / src / ldso / dlinfo.c
blobb55f5fe6cfef943a563f0a6d2e07d293e22aa8cd
1 #define _GNU_SOURCE
2 #include <dlfcn.h>
3 #include "dynlink.h"
5 int dlinfo(void *dso, int req, void *res)
7 if (__dl_invalid_handle(dso)) return -1;
8 if (req != RTLD_DI_LINKMAP) {
9 __dl_seterr("Unsupported request %d", req);
10 return -1;
12 *(struct link_map **)res = dso;
13 return 0;