summaryrefslogtreecommitdiffstats
path: root/contrib/netbsd-tests/lib/libc/string/t_strchr.c
diff options
context:
space:
mode:
authorRenato Botelho <renato@netgate.com>2017-01-09 12:07:59 -0200
committerRenato Botelho <renato@netgate.com>2017-01-09 12:07:59 -0200
commitbaeac042059786f1ed0cca7ca4a4a32721362cab (patch)
tree3b848bddaf0f478d0c0651c8ee62129d3d9bacf5 /contrib/netbsd-tests/lib/libc/string/t_strchr.c
parent1af1408e09373ae856cfef567d79849c7e7e0d25 (diff)
parentf91948fdd5322d9aae1e8785976df69612c1999f (diff)
downloadFreeBSD-src-baeac042059786f1ed0cca7ca4a4a32721362cab.zip
FreeBSD-src-baeac042059786f1ed0cca7ca4a4a32721362cab.tar.gz
Merge remote-tracking branch 'origin/stable/11' into devel-11
Diffstat (limited to 'contrib/netbsd-tests/lib/libc/string/t_strchr.c')
-rw-r--r--contrib/netbsd-tests/lib/libc/string/t_strchr.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/contrib/netbsd-tests/lib/libc/string/t_strchr.c b/contrib/netbsd-tests/lib/libc/string/t_strchr.c
index 958b186..4556b2c 100644
--- a/contrib/netbsd-tests/lib/libc/string/t_strchr.c
+++ b/contrib/netbsd-tests/lib/libc/string/t_strchr.c
@@ -58,6 +58,9 @@ ATF_TC_HEAD(strchr_basic, tc)
ATF_TC_BODY(strchr_basic, tc)
{
+#ifdef __FreeBSD__
+ void *dl_handle;
+#endif
unsigned int t, a;
char *off;
char buf[32];
@@ -245,8 +248,12 @@ ATF_TC_BODY(strchr_basic, tc)
"abcdefgh/abcdefgh/",
};
-
+#ifdef __FreeBSD__
+ dl_handle = dlopen(NULL, RTLD_LAZY);
+ strchr_fn = dlsym(dl_handle, "test_strlen");
+#else
strchr_fn = dlsym(dlopen(0, RTLD_LAZY), "test_strchr");
+#endif
if (!strchr_fn)
strchr_fn = strchr;
@@ -281,6 +288,9 @@ ATF_TC_BODY(strchr_basic, tc)
verify_strchr(buf + a, 0xff, t, a);
}
}
+#ifdef __FreeBSD__
+ (void)dlclose(dl_handle);
+#endif
}
ATF_TP_ADD_TCS(tp)
OpenPOWER on IntegriCloud