File: use_separated_cutils_atomic.diff

package info (click to toggle)
android-platform-system-core 1%3A7.0.0%2Br33-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 10,464 kB
  • sloc: cpp: 96,742; ansic: 39,563; asm: 3,482; python: 1,571; sh: 666; lex: 311; java: 169; makefile: 65; xml: 19
file content (28 lines) | stat: -rw-r--r-- 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Description: cutils/atomic.h uses stdatomic.h which is not supported by C++11
Author: Kai-Chung Yan <seamlikok@gmail.com>
Last-Update: 2016-09-18
--- a/include/utils/StrongPointer.h
+++ b/include/utils/StrongPointer.h
@@ -17,7 +17,9 @@
 #ifndef ANDROID_STRONG_POINTER_H
 #define ANDROID_STRONG_POINTER_H
 
-#include <cutils/atomic.h>
+extern "C" {
+#include "cutils_atomic.h"
+}
 
 #include <stdint.h>
 #include <sys/types.h>
--- a/include/utils/Atomic.h
+++ b/include/utils/Atomic.h
@@ -17,6 +17,8 @@
 #ifndef ANDROID_UTILS_ATOMIC_H
 #define ANDROID_UTILS_ATOMIC_H
 
-#include <cutils/atomic.h>
+extern "C" {
+#include "cutils_atomic.h"
+}
 
 #endif // ANDROID_UTILS_ATOMIC_H