summaryrefslogtreecommitdiff
path: root/regress
diff options
context:
space:
mode:
authorPhilip Guenther <guenther@cvs.openbsd.org>2017-09-07 21:35:36 +0000
committerPhilip Guenther <guenther@cvs.openbsd.org>2017-09-07 21:35:36 +0000
commit583e7b371f3885a272cc89de63829b6f37ef38a4 (patch)
treead00a9252bdcbe9e13b37d58bc79e09396df0f31 /regress
parent45e6991aad5b4b65cdeb797fa723b768a5a51708 (diff)
Try both libpthread and RTLD_DEFAULT when looking up functions
so the test can find everything after the libpthread->libc move
Diffstat (limited to 'regress')
-rw-r--r--regress/lib/libpthread/dlopen/dlopen.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/regress/lib/libpthread/dlopen/dlopen.c b/regress/lib/libpthread/dlopen/dlopen.c
index f9114020cf9..8176151a4a2 100644
--- a/regress/lib/libpthread/dlopen/dlopen.c
+++ b/regress/lib/libpthread/dlopen/dlopen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: dlopen.c,v 1.1 2016/05/10 03:59:55 guenther Exp $ */
+/* $OpenBSD: dlopen.c,v 1.2 2017/09/07 21:35:35 guenther Exp $ */
/*
* Copyright (c) 2016 Philip Guenther <guenther@openbsd.org>
*
@@ -663,7 +663,8 @@ main(int argc, char **argv)
/* look up all the functions. The cast here isn't strictly portable */
for (f = functions; f->name != NULL; f++) {
- if ((*(void **)f->callback = dlsym(handle, f->name)) == NULL)
+ if ((*(void **)f->callback = dlsym(handle, f->name)) == NULL &&
+ (*(void **)f->callback = dlsym(RTLD_DEFAULT, f->name)) == NULL)
errx(1, "dlsym %s: %s", f->name, dlerror());
}