mirror of
https://github.com/samba-team/samba.git
synced 2025-02-26 21:57:41 +03:00
uwrap: Fix the handle loop for older gcc versions.
Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
cf68c1accb
commit
6ca1cf208e
@ -271,11 +271,14 @@ static void *uwrap_load_lib_handle(enum uwrap_lib lib)
|
||||
case UWRAP_LIBC:
|
||||
handle = uwrap.libc.handle;
|
||||
if (handle == NULL) {
|
||||
for (handle = NULL, i = 10; handle == NULL && i >= 0; i--) {
|
||||
for (i = 10; i >= 0; i--) {
|
||||
char soname[256] = {0};
|
||||
|
||||
snprintf(soname, sizeof(soname), "libc.so.%d", i);
|
||||
handle = dlopen(soname, flags);
|
||||
if (handle != NULL) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
uwrap.libc.handle = handle;
|
||||
|
Loading…
x
Reference in New Issue
Block a user