Skip to content

Commit

Permalink
Handle older Linux without AT_HWCAP2
Browse files Browse the repository at this point in the history
Summary: Some systems lack this constant.

Reviewed By: Gownta

Differential Revision: D63746373

fbshipit-source-id: 47e6e054d5fce39e53a05ce171fb242a21c14257
  • Loading branch information
Michael van der Westhuizen authored and facebook-github-bot committed Oct 3, 2024
1 parent 4629171 commit 0794fb9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions folly/system/AuxVector.h
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,9 @@ class ElfHwCaps {
FOLLY_ALWAYS_INLINE ElfHwCaps() {
#if defined(__linux__) && !FOLLY_MOBILE
hwcap_ = getauxval(AT_HWCAP);
#if defined(AT_HWCAP2)
hwcap2_ = getauxval(AT_HWCAP2);
#endif
#endif
}

Expand Down

0 comments on commit 0794fb9

Please sign in to comment.