From 38823ac68e44c8084c98c8b869fb8b37abc38664 Mon Sep 17 00:00:00 2001 From: Andreas Schneider Date: Fri, 20 Dec 2013 13:38:19 +0100 Subject: swrap: Fix loading of system libraries. --- src/socket_wrapper.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 62e83ef..dc6ffb1 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -391,6 +391,7 @@ static void *swrap_load_lib_handle(enum swrap_lib lib) /* FALL TROUGH */ case SWRAP_LIBSOCKET: #ifdef HAVE_LIBSOCKET + handle = swrap.libsocket_handle; if (handle == NULL) { for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) { char soname[256] = {0}; @@ -400,13 +401,12 @@ static void *swrap_load_lib_handle(enum swrap_lib lib) } swrap.libsocket_handle = handle; - } else { - handle = swrap.libsocket_handle; } break; #endif /* FALL TROUGH */ case SWRAP_LIBC: + handle = swrap.libc_handle; if (handle == NULL) { for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) { char soname[256] = {0}; @@ -416,8 +416,6 @@ static void *swrap_load_lib_handle(enum swrap_lib lib) } swrap.libc_handle = handle; - } else { - handle = swrap.libc_handle; } break; } -- cgit