diff -urN socket_wrapper-1.0.2.orig/src/socket_wrapper.c socket_wrapper-1.0.2/src/socket_wrapper.c --- socket_wrapper-1.0.2.orig/src/socket_wrapper.c 2014-05-05 07:58:57.000000000 +0000 +++ socket_wrapper-1.0.2/src/socket_wrapper.c 2014-05-08 08:53:27.000000000 +0000 @@ -73,6 +73,9 @@ #include #include #include +#ifdef __GLIBC__ +#include +#endif enum swrap_dbglvl_e { SWRAP_LOG_ERROR = 0, @@ -418,6 +421,11 @@ /* FALL TROUGH */ case SWRAP_LIBC: handle = swrap.libc_handle; +#ifdef LIBC_SO + if (handle == NULL) { + handle = dlopen(LIBC_SO, flags); + } +#endif if (handle == NULL) { for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) { char soname[256] = {0};