Files
Dan Horák aaa5950232 Bug 1944513 - avoid symbol visibility issues for getauxval() r=mjf
Resolve the issue by using a system header in abseil-cpp instead of
a "private" re-declaration of getauxval().

See https://github.com/abseil/abseil-cpp/pull/1816 for the upstream change.

Differential Revision: https://phabricator.services.mozilla.com/D236213
2025-02-13 10:42:57 +00:00

26 lines
993 B
Diff

From 69187605305acf876a75c64a7665ffa725a306cb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dan=20Hor=C3=A1k?= <dan@danny.cz>
Date: Wed, 29 Jan 2025 10:22:58 +0000
Subject: Bug 1944513 - avoid symbol visibility issues for getauxval()
---
abseil-cpp/absl/random/internal/randen_detect.cc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/abseil-cpp/absl/random/internal/randen_detect.cc b/abseil-cpp/absl/random/internal/randen_detect.cc
index bdeab877..e23cdb32 100644
--- a/abseil-cpp/absl/random/internal/randen_detect.cc
+++ b/abseil-cpp/absl/random/internal/randen_detect.cc
@@ -63,7 +63,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));
--
2.47.0