diff options
author | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-10-11 16:24:05 +0100 |
---|---|---|
committer | Szabolcs Nagy <szabolcs.nagy@arm.com> | 2022-11-22 14:31:25 +0000 |
commit | e0bde778546db86042bdf4f4b8eca7f38d01a02e (patch) | |
tree | fd2e4c4c394fa8c69866f16f5b9238c6f312bdfa /iconv/tst-gconv-init-failure.c | |
parent | a05a3def727285eb498f329b16baa3f52d26df79 (diff) | |
download | glibc-e0bde778546db86042bdf4f4b8eca7f38d01a02e.tar.gz glibc-e0bde778546db86042bdf4f4b8eca7f38d01a02e.tar.xz glibc-e0bde778546db86042bdf4f4b8eca7f38d01a02e.zip |
cheri: use getauxptr in iconv/tst-gconv-init-failure test
On CHERI targets getauxval cannot return a valid pointer.
Diffstat (limited to 'iconv/tst-gconv-init-failure.c')
-rw-r--r-- | iconv/tst-gconv-init-failure.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/iconv/tst-gconv-init-failure.c b/iconv/tst-gconv-init-failure.c index b29c5db6b8..b86958ab90 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); } |