linuxOS_AP06/buildroot/package/android-adbd/0005-adb-daemon-Fix-build-issue-with-old-g.patch
2025-06-03 12:28:32 +08:00

34 lines
1.0 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

From 7174da2c4aec5a9ced62fd3687fcbed6b655cbb1 Mon Sep 17 00:00:00 2001
From: Jeffy Chen <jeffy.chen@rock-chips.com>
Date: Wed, 8 Nov 2023 17:46:30 +0800
Subject: [PATCH 5/7] adb: daemon: Fix build issue with old g++
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
The old g++ (< 11) would report error:
error: too many initializers for usb_os_desc_header
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
---
adb/daemon/usb_ffs.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/adb/daemon/usb_ffs.cpp b/adb/daemon/usb_ffs.cpp
index 07b4ba8..86476b7 100644
--- a/adb/daemon/usb_ffs.cpp
+++ b/adb/daemon/usb_ffs.cpp
@@ -183,7 +183,8 @@ static struct usb_os_desc_header os_desc_header = {
.bcdVersion = cpu_to_le32(1),
.wIndex = cpu_to_le32(4),
.bCount = cpu_to_le32(1),
- .Reserved = cpu_to_le32(0),
+ // HACK: Workaround "too many initializers" error in g++ older than 11
+ // .Reserved = cpu_to_le32(0),
};
#define STR_INTERFACE_ "ADB Interface"
--
2.20.1