From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gandalf.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id 7367B5A027A for ; Thu, 30 Nov 2023 01:55:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=201602; t=1701305703; bh=DaRC2oIHFQm8PrFusIjnYTwIRlsCRMA//MUAuhtpdQk=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=kyrfEgkvBHgzxo11zRWDMU1M1lDQnACjQc6Q5yMlTU50TvSrE+SgtFKtuutvH7BjJ dEUQoBZGySmws8qygYYKMHO1i5H2z5ejsntJD8PIPxTYD/E9EAdt+zFeXFJPHNHoSf jNHHSNklQJlIH7z0W9XpoPbDU9zsTKRz5Y27yFWM= Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4Sgd5M3f7Zz4xVg; Thu, 30 Nov 2023 11:55:03 +1100 (AEDT) Date: Thu, 30 Nov 2023 11:30:41 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH 4/4] port_fwd, util: Include additional headers to fix build with musl Message-ID: References: <20231129134610.3796809-1-sbrivio@redhat.com> <20231129134610.3796809-5-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="SKAz0hQ8573YuuKc" Content-Disposition: inline In-Reply-To: <20231129134610.3796809-5-sbrivio@redhat.com> Message-ID-Hash: 5NPFGAQASA6TVSEEZM4SSY6NWSOIJMYL X-Message-ID-Hash: 5NPFGAQASA6TVSEEZM4SSY6NWSOIJMYL X-MailFrom: dgibson@gandalf.ozlabs.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: passt-dev@passt.top, lemmi@nerd2nerd.org X-Mailman-Version: 3.3.8 Precedence: list List-Id: Development discussion and patches for passt Archived-At: Archived-At: List-Archive: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: --SKAz0hQ8573YuuKc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 29, 2023 at 02:46:10PM +0100, Stefano Brivio wrote: > lseek() is declared in unistd.h, and stdio.h provides sscanf(). > Include these two headers in port_fwd.c. >=20 > SIGCHLD, even if used exclusively for clone(), is defined in > signal.h: add the include to util.h, as NS_CALL needs it. In theory the clang-tidy warnings I recently suppressed for ensuring we *directly* include the things we need would help avoid problems like this. Unfortunately it generates too many dumb warnings to be usable. I guess to do this correctly a checker would need to know the official/standardised header for every libc function, and require you to include that, whether or not that directly or directly contains it on this particular system. > Reported-by: lemmi > Link: https://github.com/void-linux/void-packages/actions/runs/6999782606= /job/19039526604#step:7:57 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > port_fwd.c | 2 ++ > util.h | 1 + > 2 files changed, 3 insertions(+) >=20 > diff --git a/port_fwd.c b/port_fwd.c > index 7943a30..6f6c836 100644 > --- a/port_fwd.c > +++ b/port_fwd.c > @@ -17,6 +17,8 @@ > #include > #include > #include > +#include > +#include > =20 > #include "util.h" > #include "port_fwd.h" > diff --git a/util.h b/util.h > index 1f02588..86f1a7e 100644 > --- a/util.h > +++ b/util.h > @@ -10,6 +10,7 @@ > #include > #include > #include > +#include > =20 > #include "log.h" > =20 --=20 David Gibson | I'll have my music baroque, and my code david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_ | _way_ _around_! http://www.ozlabs.org/~dgibson --SKAz0hQ8573YuuKc Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmVn17AACgkQzQJF27ox 2GepLRAApCrR5AHI+sYo0MzbU8QPAziE9E4m1sCjWcSIGtgV/mdDATAB/TJN1fxo 2KfzWbNKEc/j1qhwCSLDHiw+vTrD9JakcNFhXQJpUgqBoL3x0zQk8EDJKy/66Qex FxX+QseT94cqmPxvgVlay0LL4lawKJ5/XgGlCBsmsl9hZjUWE9+ksEKRkTq2kBnH 3fINL6G5hvFfm/pis9gWpzHzLd/q9TxZ5uahd2WHxqNz4Zz47Wm9zOO9NdrkWxi2 MFxkoY7VLJULv61P811MsvOE39hV1OSOsSCBagw6F1sq1H/heAYphusw879ggzTy m3exNGFVISCE/4mlN+xxD4khHDm6hLbcXyPyx3xG74ihz2WE5+kFupnmPZN5lKbq LrGnpcl9OlpHLYOrcDT4r2xBA/BsJJS0tdl68G54eZZO15d8xjYOtqx1r2Nrs3OF WN0Tnc43H9VYgyLUOy6fITMEowj9JU0UvDEMdqjJiXLqFN52ietquYLyoZRQlr74 H+DzT6bZBYyTEEEMt00ODcH0rLrwTUQyFICOeZ5ShJzvaJ0M0p6eMQLy65zwX5T/ 69ImFWjCpIM/xqHUOH3vMXS+qkxEc9/wwGMxLxkqKiKhfhKblpJpf7EinLxybrdI Wv4EHzvlCNXzDH7DSxI4SC1Al4W1uZzNI94kgvMOGJs7PP8Z5fs= =9mPO -----END PGP SIGNATURE----- --SKAz0hQ8573YuuKc--