summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2013-12-20 13:38:19 +0100
committerAndreas Schneider <asn@samba.org>2013-12-20 13:38:19 +0100
commit38823ac68e44c8084c98c8b869fb8b37abc38664 (patch)
tree5c6efd46eb828c98dab8cbe134be04c29241e2a4
parent1e413ec5497c82375dd11739912ddedd4743bb5f (diff)
downloadsocket_wrapper-38823ac68e44c8084c98c8b869fb8b37abc38664.tar.gz
socket_wrapper-38823ac68e44c8084c98c8b869fb8b37abc38664.tar.xz
socket_wrapper-38823ac68e44c8084c98c8b869fb8b37abc38664.zip
swrap: Fix loading of system libraries.
-rw-r--r--src/socket_wrapper.c6
1 files changed, 2 insertions, 4 deletions
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;
}