Skip to content

Commit

Permalink
Support OSX dylib syntax
Browse files Browse the repository at this point in the history
The code needs to be ifdefed this way due to zOS and the
way it has macroized dlopen

The code needs to be ifdefed this way due to zOS and the
way it has macroized dlopen.  Otherwise, the zOS compile
will fail

Signed-off-by: Dan Heidinga <[email protected]>
  • Loading branch information
DanHeidinga committed Aug 27, 2018
1 parent abf344d commit 9fda6c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runtime/jsigWrapper/jsig.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,13 @@ getFunction(void **tableAddress, char *name)
void *handle = dlopen("libomrsig.so", RTLD_LAZY);
*tableAddress = dlsym(handle, name);
#else /* defined(WIN32) */
void *handle = dlopen("libomrsig.so", RTLD_GLOBAL | RTLD_LAZY);
/* Note: this needs to be ifdef'd this way for zOS to compile as it redefines dlopen */
void *handle =
#if defined(OSX)
dlopen("libomrsig.dylib", RTLD_GLOBAL | RTLD_LAZY);
#else /* OSX */
dlopen("libomrsig.so", RTLD_GLOBAL | RTLD_LAZY);
#endif /*OSX */
*tableAddress = dlsym(handle, name);
#endif /* defined(WIN32) */
}
Expand Down

0 comments on commit 9fda6c6

Please sign in to comment.