From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) by sourceware.org (Postfix) with ESMTPS id 0B0F13858D33 for ; Tue, 7 Feb 2023 19:47:45 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 0B0F13858D33 Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=linux.ibm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 317Jh3cO029161; Tue, 7 Feb 2023 19:47:29 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : to : cc : date : in-reply-to : references : content-type : content-transfer-encoding : mime-version; s=pp1; bh=nAX9qETmnABqIFP3FTGUYNneCG+aVzXUfU5w+6YEFng=; b=RgP+8RYm1UJk29oni/l/29IaDxR1Jte1N52gtCgX30tlezp+KhtMSdbq+FJvDYxEd3Qf dXnhTTQjvmhp7a5jHjPd64U8cIQZ8gPbZEpzjXcnwMtpWwArQjaZz7qKH0EOvbmLYS76 S2kmrgisIdUau6MEPI5QYGVAsLzuhndvgUTFg0QF80nNYK1YA1zC2zsIooteeYsmmgT4 qosBWLYYfV+axZ6kpEDyvnoV4Xw/t0xZjaDYGzzGXcnfhfzjyEBJHTAj0s+Dw4CZ0PvI /plXLOlstai+mY9UhIaMb8ZMiCVzA1moOOC+3tQD6LR5RgeLtRUVCnK5EHnPoukk6rgT Ng== Received: from ppma03ams.nl.ibm.com (62.31.33a9.ip4.static.sl-reverse.com [169.51.49.98]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3nkw1yg3tp-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Feb 2023 19:47:28 +0000 Received: from pps.filterd (ppma03ams.nl.ibm.com [127.0.0.1]) by ppma03ams.nl.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 317B7Go5001826; Tue, 7 Feb 2023 19:47:27 GMT Received: from smtprelay02.fra02v.mail.ibm.com ([9.218.2.226]) by ppma03ams.nl.ibm.com (PPS) with ESMTPS id 3nhf06kye3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 07 Feb 2023 19:47:27 +0000 Received: from smtpav06.fra02v.mail.ibm.com (smtpav06.fra02v.mail.ibm.com [10.20.54.105]) by smtprelay02.fra02v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 317JlOqS32047534 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 7 Feb 2023 19:47:24 GMT Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id A41EA2004B; Tue, 7 Feb 2023 19:47:24 +0000 (GMT) Received: from smtpav06.fra02v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 6E7FD20049; Tue, 7 Feb 2023 19:47:24 +0000 (GMT) Received: from [9.179.25.234] (unknown [9.179.25.234]) by smtpav06.fra02v.mail.ibm.com (Postfix) with ESMTP; Tue, 7 Feb 2023 19:47:24 +0000 (GMT) Message-ID: Subject: Re: [PATCH RFC 01/11] libdwfl: Fix debuginfod_client redefinition From: Ilya Leoshkevich To: Mark Wielaard Cc: elfutils-devel@sourceware.org Date: Tue, 07 Feb 2023 20:47:24 +0100 In-Reply-To: <20230207192214.GB25444@gnu.wildebeest.org> References: <20230206222513.1773039-1-iii@linux.ibm.com> <20230206222513.1773039-2-iii@linux.ibm.com> <20230207192214.GB25444@gnu.wildebeest.org> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.46.3 (3.46.3-1.fc37) X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: kqTQfdxkVB0fesZd_XHIXu4jW4ybOXKy X-Proofpoint-GUID: kqTQfdxkVB0fesZd_XHIXu4jW4ybOXKy Content-Transfer-Encoding: quoted-printable X-Proofpoint-UnRewURL: 0 URL was un-rewritten MIME-Version: 1.0 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.930,Hydra:6.0.562,FMLib:17.11.122.1 definitions=2023-02-07_11,2023-02-06_03,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 mlxlogscore=612 bulkscore=0 priorityscore=1501 suspectscore=0 spamscore=0 clxscore=1015 mlxscore=0 adultscore=0 impostorscore=0 malwarescore=0 phishscore=0 lowpriorityscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2212070000 definitions=main-2302070172 X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,BODY_8BITS,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On Tue, 2023-02-07 at 20:22 +0100, Mark Wielaard wrote: > Hi Ilyam >=20 > On Mon, Feb 06, 2023 at 11:25:03PM +0100, Ilya Leoshkevich via > Elfutils-devel wrote: > > clang complains: > >=20 > > =C2=A0=C2=A0=C2=A0 In file included from debuginfod-client.c:38: > > =C2=A0=C2=A0=C2=A0 ./../debuginfod/debuginfod.h:47:34: error: redefinit= ion of > > typedef 'debuginfod_client' is a C11 feature [-Werror,-Wtypedef- > > redefinition] > > =C2=A0=C2=A0=C2=A0 typedef struct debuginfod_client debuginfod_client; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ > > =C2=A0=C2=A0=C2=A0 ./libdwfl.h:53:34: note: previous definition is here > > =C2=A0=C2=A0=C2=A0 typedef struct debuginfod_client debuginfod_client; > > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 ^ > >=20 > > config/eu.am specifies -std=3Dgnu99, and upgrading just for this is > > an > > overkill. So is #including "debuginfod.h", since we don't know if > > users > > even have it. So fix by using "struct debuginfod_client" instead. > > This > > may break the clients that use dwfl_get_debuginfod_client() without > > #including "debuginfod.h", but such cases should be rare. >=20 > This was recently reported by someone else and fixed differently: >=20 > commit 45576ab5f24cd39669a418fa8e005b4d04f8e9ca > Author: Mark Wielaard > Date:=C2=A0=C2=A0 Mon Feb 6 10:21:58 2023 +0100 >=20 > =C2=A0=C2=A0=C2=A0 debuginfod: Make sure there is only one typedef for > debuginfod_client > =C2=A0=C2=A0=C2=A0=20 > =C2=A0=C2=A0=C2=A0 Both debuginfod.h and libdwfl.h have a simple typedef = for struct > =C2=A0=C2=A0=C2=A0 debuginfod_client. Some compilers pedantically warn wh= en > including > =C2=A0=C2=A0=C2=A0 both headers that such typedefs are only officially su= pported in > =C2=A0=C2=A0=C2=A0 C11. So guard them with _ELFUTILS_DEBUGINFOD_CLIENT_TY= PEDEF to > =C2=A0=C2=A0=C2=A0 make them happy. > =C2=A0=C2=A0=C2=A0=20 > =C2=A0=C2=A0=C2=A0 https://sourceware.org/bugzilla/show_bug.cgi?id=3D30077 > =C2=A0=C2=A0=C2=A0=20 > =C2=A0=C2=A0=C2=A0 Signed-off-by: Mark Wielaard >=20 > Does that work for you? >=20 > Thanks, >=20 > Mark Thanks, this works. This patch can be dropped.