Random: use getauxval() via <sys/auxv.h>

Make the use of getauxval() consistent with other parts of abseil and
use it via the <sys/auxv.h> header instead of a local declaration.
This commit is contained in:
Dan Horák
2025-01-28 10:58:21 +00:00
parent 20a1220136
commit 61a56f3a58

View File

@@ -74,7 +74,7 @@ static void __cpuid(int cpu_info[4], int info_type) {
// On linux, just use the c-library getauxval call.
#if defined(ABSL_INTERNAL_USE_LINUX_GETAUXVAL)
extern "C" unsigned long getauxval(unsigned long type); // NOLINT(runtime/int)
#include <sys/auxv.h>
static uint32_t GetAuxval(uint32_t hwcap_type) {
return static_cast<uint32_t>(getauxval(hwcap_type));