Skip to content

Commit 0f102ad

Browse files
sharkczcopybara-github
authored andcommitted
PR #1816: Random: use getauxval() via <sys/auxv.h>
Imported from GitHub PR #1816 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. The current situation is causing some weird symbol visibility issues at least in Firefox, see https://bugzilla.mozilla.org/show_bug.cgi?id=1942917 for details. Merge 61a56f3 into 20a1220 Merging this change closes #1816 COPYBARA_INTEGRATE_REVIEW=#1816 from sharkcz:random 61a56f3 PiperOrigin-RevId: 721365575 Change-Id: I99d0fc6fd9abd3b8ba175af88f4a1b7f6862e589
1 parent 5f9f2cf commit 0f102ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

absl/random/internal/randen_detect.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ static void __cpuid(int cpu_info[4], int info_type) {
7474
// On linux, just use the c-library getauxval call.
7575
#if defined(ABSL_INTERNAL_USE_LINUX_GETAUXVAL)
7676

77-
extern "C" unsigned long getauxval(unsigned long type); // NOLINT(runtime/int)
77+
#include <sys/auxv.h>
7878

7979
static uint32_t GetAuxval(uint32_t hwcap_type) {
8080
return static_cast<uint32_t>(getauxval(hwcap_type));

0 commit comments

Comments
 (0)