From de60a74dc0db25e097538240a1fda613ed17246f Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Wed, 3 Jul 2013 17:00:35 +0200 Subject: src: Also support loading MacOSX libc. --- src/socket_wrapper.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 53ca288..46d8b0c 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -282,6 +282,7 @@ static int libc_dlopen(void) return 0; } + for (libc_hnd = NULL, i = 10; libc_hnd == NULL; i--) { char soname[256] = {0}; @@ -289,6 +290,11 @@ static int libc_dlopen(void) libc_hnd = dlopen(soname, flags); } + /* Maybe we're on MacOSX */ + if (libc_hnd == NULL) { + libc_hnd = dlopen("libc.dylib", flags); + } + if (libc_hnd == NULL) { SWRAP_LOG(SWRAP_LOG_ERROR, "Failed to dlopen %s.%u: %s\n", -- cgit