From: Guillem Jover Date: Thu, 31 Mar 2022 18:46:56 +0000 (+0200) Subject: getentropy: Fix function cast for getauxval() X-Git-Tag: 0.11.7~18 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=5f21307570dff129c2e982a3ab8640d09302b2bf;p=thirdparty%2Flibbsd.git getentropy: Fix function cast for getauxval() Fix also the Hurd implementation, missed in the original fix. Extends: commit 72a82ee262795c9162e712885381a111fcf988bc Warned-by: gcc --- diff --git a/src/getentropy_hurd.c b/src/getentropy_hurd.c index 2f76baa..8f2ba16 100644 --- a/src/getentropy_hurd.c +++ b/src/getentropy_hurd.c @@ -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