Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(188)

Side by Side Diff: webrtc/system_wrappers/source/cpu_features_linux.c

Issue 2727783004: Check __GLIBC_PREREQ availability before use. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
11 #include <stdlib.h> 11 #include <stdlib.h>
12 #include <string.h> 12 #include <string.h>
13 #include <features.h> 13 #include <features.h>
14 #ifndef __GLIBC_PREREQ
15 #define __GLIBC_PREREQ(a, b) 0
16 #endif
14 #if __GLIBC_PREREQ(2, 16) 17 #if __GLIBC_PREREQ(2, 16)
15 #include <sys/auxv.h> 18 #include <sys/auxv.h>
16 #else 19 #else
17 #include <fcntl.h> 20 #include <fcntl.h>
18 #include <unistd.h> 21 #include <unistd.h>
19 #include <errno.h> 22 #include <errno.h>
20 #include <link.h> 23 #include <link.h>
21 #endif 24 #endif
22 #include "webrtc/system_wrappers/include/cpu_features_wrapper.h" 25 #include "webrtc/system_wrappers/include/cpu_features_wrapper.h"
23 26
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if ((hwcap & HWCAP_NEON) != 0) 77 if ((hwcap & HWCAP_NEON) != 0)
75 result |= kCPUFeatureNEON; 78 result |= kCPUFeatureNEON;
76 #endif 79 #endif
77 if (architecture >= 7) 80 if (architecture >= 7)
78 result |= kCPUFeatureARMv7; 81 result |= kCPUFeatureARMv7;
79 if (architecture >= 6) 82 if (architecture >= 6)
80 result |= kCPUFeatureLDREXSTREX; 83 result |= kCPUFeatureLDREXSTREX;
81 return result; 84 return result;
82 } 85 }
83 #endif // WEBRTC_ARCH_ARM_FAMILY 86 #endif // WEBRTC_ARCH_ARM_FAMILY
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698