]> git.ipfire.org Git - thirdparty/libbsd.git/commitdiff
getentropy: Fix function cast for getauxval()
authorGuillem Jover <guillem@hadrons.org>
Thu, 31 Mar 2022 18:46:56 +0000 (20:46 +0200)
committerGuillem Jover <guillem@hadrons.org>
Wed, 8 Jun 2022 09:49:16 +0000 (11:49 +0200)
Fix also the Hurd implementation, missed in the original fix.

Extends: commit 72a82ee262795c9162e712885381a111fcf988bc
Warned-by: gcc
src/getentropy_hurd.c

index 2f76baa5ca4b576f124b2240efb5f7752c9c210d..8f2ba1681761f0ead90d4435be97548dbc3af9c7 100644 (file)
@@ -415,17 +415,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