From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id A2FDA3858C52; Sun, 5 Feb 2023 10:46:21 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A2FDA3858C52 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1675593981; bh=o9+ijVQmQE+wsqNEL4lzomLU6nLND9UXs+WmXLfuikQ=; h=From:To:Subject:Date:In-Reply-To:References:From; b=QK0d21MgE1iCPYk3EUZVXBZvoAzJIGuqmpVB2lVrrFLfOnaiavvtr+7imXXPltaJx mWHsWnr1a06ZSj29vOtuzq8txSpopdYY6F6OqmE00oAhTklS19bEd4BSneosmneDWK bErKTKgnfTTp0psmkjN1tDKY3Wn99UzMnDESxArE= From: "mark at klomp dot org" To: elfutils-devel@sourceware.org Subject: [Bug libdw/30077] Duplicate definition of typedef struct debuginfod_client in libdwfl Date: Sun, 05 Feb 2023 10:46:21 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: elfutils X-Bugzilla-Component: libdw X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: mark at klomp dot org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D30077 --- Comment #5 from Mark Wielaard --- (In reply to David Edelsohn from comment #3) > The struct is needed by libdwfl.h to prototype >=20 > extern debuginfod_client *dwfl_get_debuginfod_client (Dwfl *dwfl); >=20 > but that function is defined in debuginfod-client.c protected by >=20 > #ifdef ENABLE_LIBDEBUGINFOD >=20 > It already is protected where it is referenced by an existing macro. The > problem is the header logic doesn't match the logic in the file that uses > that prototype. >=20 > So, again, it would seem better to include the struct from > debuginfod-client.h directly instead of adding more macros to protect the > headers and types that already are protected. Something like: The public headers are independent and can be used with or without the other being available. And the function must be defined with or without libdebugi= nfod support available or installed. You cannot use the same guards in the public headers and the implementation sources because they are independent. It might be helpful to know in which configuration you are having this issu= e. --=20 You are receiving this mail because: You are on the CC list for the bug.=