this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Make Darling compatible with musl libc

Also update Cocotron

+5 -4
+5 -4
src/libelfloader/wrapgen/wrapgen.cpp
··· 1 + 1 2 #include <string> 2 3 #include <iostream> 3 4 #include <set> ··· 11 12 #include <sstream> 12 13 #include <stdexcept> 13 14 #include <fstream> 15 + #include <link.h> 14 16 15 17 #ifndef PATH_MAX 16 18 # define PATH_MAX 4096 ··· 52 54 // It is simpler than parsing /etc/ld.so.conf. 53 55 54 56 void* handle = dlopen(elfLibrary.c_str(), RTLD_LAZY | RTLD_LOCAL); 55 - char path[PATH_MAX]; 57 + struct link_map* lm = NULL; 56 58 57 59 if (!handle) 58 60 { ··· 61 63 throw std::runtime_error(ss.str()); 62 64 } 63 65 64 - if (dlinfo(handle, RTLD_DI_ORIGIN, path) == 0) 66 + if (dlinfo(handle, RTLD_DI_LINKMAP, &lm) == 0) 65 67 { 66 - elfLibrary.insert(0, "/"); 67 - elfLibrary.insert(0, path); 68 + elfLibrary = lm->l_name; 68 69 } 69 70 else 70 71 {