mirror of
https://github.com/corda/corda.git
synced 2025-01-01 10:46:46 +00:00
use lib%s.dylib to map library names on Darwin
This commit is contained in:
parent
54cabf9240
commit
a688a6f61a
@ -597,9 +597,15 @@ class MySystem: public System {
|
|||||||
void* p;
|
void* p;
|
||||||
unsigned nameLength = (name ? strlen(name) : 0);
|
unsigned nameLength = (name ? strlen(name) : 0);
|
||||||
if (mapName) {
|
if (mapName) {
|
||||||
|
#ifdef __APPLE__
|
||||||
|
unsigned size = nameLength + 10;
|
||||||
|
char buffer[size];
|
||||||
|
snprintf(buffer, size, "lib%s.dylib", name);
|
||||||
|
#else
|
||||||
unsigned size = nameLength + 7;
|
unsigned size = nameLength + 7;
|
||||||
char buffer[size];
|
char buffer[size];
|
||||||
snprintf(buffer, size, "lib%s.so", name);
|
snprintf(buffer, size, "lib%s.so", name);
|
||||||
|
#endif
|
||||||
p = dlopen(buffer, RTLD_LAZY);
|
p = dlopen(buffer, RTLD_LAZY);
|
||||||
} else {
|
} else {
|
||||||
p = dlopen(name, RTLD_LAZY);
|
p = dlopen(name, RTLD_LAZY);
|
||||||
|
Loading…
Reference in New Issue
Block a user