From 7f557b46c4e8424816cd1fb905d77dc9a007a083 Mon Sep 17 00:00:00 2001 From: Karl Wiberg Date: Fri, 4 Sep 2020 14:23:04 +0200 Subject: [PATCH] Don't make up names with double underscores They're reserved for use by the compiler, standard library, etc. Bug: None Change-Id: I3b5106473b52847b9de406aaab307909b5378dba Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/183440 Reviewed-by: Mirko Bonadei Commit-Queue: Karl Wiberg Cr-Commit-Position: refs/heads/master@{#32038} --- system_wrappers/source/cpu_features_linux.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/system_wrappers/source/cpu_features_linux.c b/system_wrappers/source/cpu_features_linux.c index 004de5a6a9..37739c12f6 100644 --- a/system_wrappers/source/cpu_features_linux.c +++ b/system_wrappers/source/cpu_features_linux.c @@ -11,10 +11,14 @@ #include #include #include -#ifndef __GLIBC_PREREQ -#define __GLIBC_PREREQ(a, b) 0 + +#ifdef __GLIBC_PREREQ +#define WEBRTC_GLIBC_PREREQ(a, b) __GLIBC_PREREQ(a, b) +#else +#define WEBRTC_GLIBC_PREREQ(a, b) 0 #endif -#if __GLIBC_PREREQ(2, 16) + +#if WEBRTC_GLIBC_PREREQ(2, 16) #include #else #include @@ -22,6 +26,7 @@ #include #include #endif + #include "rtc_base/system/arch.h" #include "system_wrappers/include/cpu_features_wrapper.h" @@ -33,7 +38,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) { int architecture = 0; unsigned long hwcap = 0; const char* platform = NULL; -#if __GLIBC_PREREQ(2, 16) +#if WEBRTC_GLIBC_PREREQ(2, 16) hwcap = getauxval(AT_HWCAP); platform = (const char*)getauxval(AT_PLATFORM); #else @@ -57,7 +62,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) { } close(fd); } -#endif // __GLIBC_PREREQ(2,16) +#endif // WEBRTC_GLIBC_PREREQ(2, 16) #if defined(__aarch64__) architecture = 8; if ((hwcap & HWCAP_FP) != 0)