diff options
author | 2017-09-07 21:35:35 +0000 | |
---|---|---|
committer | 2017-09-07 21:35:35 +0000 | |
commit | 41a8fc2a5488a7dff83c4ed9a3c897ebd6043b0a (patch) | |
tree | 32fc69a433758fa7e31d11fef86f0a73fc6de206 | |
parent | Keep histptr inside of the allocated history array (diff) | |
download | wireguard-openbsd-41a8fc2a5488a7dff83c4ed9a3c897ebd6043b0a.tar.xz wireguard-openbsd-41a8fc2a5488a7dff83c4ed9a3c897ebd6043b0a.zip |
Try both libpthread and RTLD_DEFAULT when looking up functions
so the test can find everything after the libpthread->libc move
-rw-r--r-- | regress/lib/libpthread/dlopen/dlopen.c | 5 |
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()); } |