void-packages/srcpkgs/android-tools/patches/gcc-fixes.patch

31 lines
557 B
Diff
Raw Normal View History

--- core/adb/sysdeps.h
+++ core/adb/sysdeps.h
@@ -66,6 +66,11 @@
#endif
#endif
+#ifndef __clang__
+#define _Nonnull
+#define _Nullable
+#endif
+
#ifdef _WIN32
// Clang-only nullability specifiers
--- core/libcutils/include/cutils/trace.h
+++ core/libcutils/include/cutils/trace.h
@@ -18,7 +18,13 @@
#define _LIBS_CUTILS_TRACE_H
#include <inttypes.h>
+// https://gcc.gnu.org/PR60932
+#ifdef __cplusplus
+#include <atomic>
+using namespace std;
+#else
#include <stdatomic.h>
+#endif
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>