nmeum / android-tools

Unoffical CMake-based build system for android command line utilities
Apache License 2.0
177 stars 51 forks source link

Issues with GCC 12.1 #60

Closed FireBurn closed 2 years ago

FireBurn commented 2 years ago

Hi

I need the following patch to compile with GCC 12.1

From 752fc3bd9a971858dbb7b51a0ef0289232e67e58 Mon Sep 17 00:00:00 2001
From: Mike Lothian <mike@fireburn.co.uk>
Date: Sat, 14 May 2022 02:01:18 +0100
Subject: [PATCH] Add functional include

---
tls/include/adb/tls/tls_connection.h | 1 +
1 file changed, 1 insertion(+)

diff --git a/tls/include/adb/tls/tls_connection.h
b/tls/include/adb/tls/tls_connection.h
index bc5b98ab..a112756c 100644
--- a/tls/include/adb/tls/tls_connection.h
+++ b/tls/include/adb/tls/tls_connection.h
@@ -19,6 +19,7 @@
#include <stddef.h>
#include <stdint.h>

+#include <functional>
#include <string_view>
#include <vector>

It also warns about:

 * QA Notice: Package triggers severe warnings which indicate that it
 *            may exhibit random runtime failures.
 * /var/tmp/portage/dev-util/android-tools-31.0.3_p1/work/android-tools-31.0.3p1/vendor/selinux/libselinux/src/label_file.h:289:25: warning: ‘free’ called on pointer ‘mmap_area_89->next_addr’ with nonzero offset 4 [-Wfree-nonheap-object]

Which is fixed with https://github.com/SELinuxProject/selinux/commit/6e5d16a012e1845774da106846b87090d39ea8f3

nmeum commented 2 years ago

Could create a pull request for the patch? (:

FireBurn commented 2 years ago

It's in a subproject, I'm not entirely sure how to do a PR on Google code, but I've emailed the last person that touched the code

nmeum commented 2 years ago

I was referring to this repository. Can you test #61?