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 <mbonadei@webrtc.org> Commit-Queue: Karl Wiberg <kwiberg@webrtc.org> Cr-Commit-Position: refs/heads/master@{#32038}
This commit is contained in:
@ -11,10 +11,14 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <features.h>
|
#include <features.h>
|
||||||
#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
|
#endif
|
||||||
#if __GLIBC_PREREQ(2, 16)
|
|
||||||
|
#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||||
#include <sys/auxv.h>
|
#include <sys/auxv.h>
|
||||||
#else
|
#else
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
@ -22,6 +26,7 @@
|
|||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <link.h>
|
#include <link.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "rtc_base/system/arch.h"
|
#include "rtc_base/system/arch.h"
|
||||||
#include "system_wrappers/include/cpu_features_wrapper.h"
|
#include "system_wrappers/include/cpu_features_wrapper.h"
|
||||||
|
|
||||||
@ -33,7 +38,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) {
|
|||||||
int architecture = 0;
|
int architecture = 0;
|
||||||
unsigned long hwcap = 0;
|
unsigned long hwcap = 0;
|
||||||
const char* platform = NULL;
|
const char* platform = NULL;
|
||||||
#if __GLIBC_PREREQ(2, 16)
|
#if WEBRTC_GLIBC_PREREQ(2, 16)
|
||||||
hwcap = getauxval(AT_HWCAP);
|
hwcap = getauxval(AT_HWCAP);
|
||||||
platform = (const char*)getauxval(AT_PLATFORM);
|
platform = (const char*)getauxval(AT_PLATFORM);
|
||||||
#else
|
#else
|
||||||
@ -57,7 +62,7 @@ uint64_t WebRtc_GetCPUFeaturesARM(void) {
|
|||||||
}
|
}
|
||||||
close(fd);
|
close(fd);
|
||||||
}
|
}
|
||||||
#endif // __GLIBC_PREREQ(2,16)
|
#endif // WEBRTC_GLIBC_PREREQ(2, 16)
|
||||||
#if defined(__aarch64__)
|
#if defined(__aarch64__)
|
||||||
architecture = 8;
|
architecture = 8;
|
||||||
if ((hwcap & HWCAP_FP) != 0)
|
if ((hwcap & HWCAP_FP) != 0)
|
||||||
|
Reference in New Issue
Block a user