From 7174da2c4aec5a9ced62fd3687fcbed6b655cbb1 Mon Sep 17 00:00:00 2001 From: Jeffy Chen 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 --- 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