aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-11 16:24:05 +0100
committerSzabolcs Nagy <szabolcs.nagy@arm.com>2022-10-27 14:46:55 +0100
commit86affaf7e9121e580abd27e5d423163e75e405c9 (patch)
tree6e7b3555d6001e3f093120df20e4dd75765fde36
parenta0567ce645bd539b8a362d4dea1ce8e71dba2942 (diff)
downloadglibc-86affaf7e9121e580abd27e5d423163e75e405c9.zip
glibc-86affaf7e9121e580abd27e5d423163e75e405c9.tar.gz
glibc-86affaf7e9121e580abd27e5d423163e75e405c9.tar.bz2
cheri: use getauxptr in iconv/tst-gconv-init-failure test
On CHERI targets getauxval cannot return a valid pointer.
-rw-r--r--iconv/tst-gconv-init-failure.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/iconv/tst-gconv-init-failure.c b/iconv/tst-gconv-init-failure.c
index b29c5db..b86958a 100644
--- a/iconv/tst-gconv-init-failure.c
+++ b/iconv/tst-gconv-init-failure.c
@@ -31,13 +31,13 @@
static void
activate_test_gconv_modules (void)
{
- unsigned long ptr = getauxval (AT_EXECFN);
- if (ptr == 0)
+ const char *ptr = getauxptr (AT_EXECFN);
+ if (ptr == NULL)
{
printf ("warning: AT_EXECFN not support, cannot run test\n");
exit (EXIT_UNSUPPORTED);
}
- char *test_program_directory = dirname (xstrdup ((const char *) ptr));
+ char *test_program_directory = dirname (xstrdup (ptr));
TEST_VERIFY (setenv ("GCONV_PATH", test_program_directory, 1) == 0);
free (test_program_directory);
}