]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
getentropy: Fix function cast for getauxval()
authorGuillem Jover <guillem@hadrons.org>
Sat, 20 Feb 2021 21:22:54 +0000 (22:22 +0100)
committerGuillem Jover <guillem@hadrons.org>
Sun, 28 Feb 2021 04:30:37 +0000 (05:30 +0100)
Warned-by: gcc
src/getentropy_linux.c

index 25c986e782ba63ca40d56416171efbaa2ea7ee12..9cb3368e89c44224c85750a223b55c7c354a964b 100644 (file)
@@ -520,17 +520,17 @@ getentropy_fallback(void *buf, size_t len)
 #ifdef HAVE_GETAUXVAL
 #ifdef AT_RANDOM
                /* Not as random as you think but we take what we are given */
-               p = (char *) getauxval(AT_RANDOM);
+               p = (char *) ((intptr_t) getauxval(AT_RANDOM));
                if (p)
                        HR(p, 16);
 #endif
 #ifdef AT_SYSINFO_EHDR
-               p = (char *) getauxval(AT_SYSINFO_EHDR);
+               p = (char *) ((intptr_t) getauxval(AT_SYSINFO_EHDR));
                if (p)
                        HR(p, pgs);
 #endif
 #ifdef AT_BASE
-               p = (char *) getauxval(AT_BASE);
+               p = (char *) ((intptr_t) getauxval(AT_BASE));
                if (p)
                        HD(p);
 #endif