From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: passt.top; dmarc=none (p=none dis=none) header.from=gibson.dropbear.id.au Authentication-Results: passt.top; dkim=pass (2048-bit key; secure) header.d=gibson.dropbear.id.au header.i=@gibson.dropbear.id.au header.a=rsa-sha256 header.s=202502 header.b=FBfeZb34; dkim-atps=neutral Received: from mail.ozlabs.org (gandalf.ozlabs.org [150.107.74.76]) by passt.top (Postfix) with ESMTPS id EAEBC5A061E for ; Wed, 05 Feb 2025 23:33:04 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202502; t=1738794758; bh=2QyGfbOX9/1Cj2bnlT3To3DT3SiuiE3p5KLtZbOlA94=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=FBfeZb34YyRK1hObvoiPrZ4BaYPh/BwPgjaEbZc8gPaCVmoxriVBNKWNM9HyzhgFG FhJCysqeRZLu4uF/36iMR9yocsdv8t2N5ct/6tctLMlJajf9T0MmyuSS+XnpkAGizb BpblfQnLA0eT9tBsh/6GWZjX86m+HgkpL+q5G8+w16euoXJ5H0vm0o8nDAesj93zDb zPyRuEtk48gJN+3L6xyaHKQBtn5qG9dFR6TvjBHyhj78s3hGnUTAOb2dIKzoIbvHnP ZWScMCX7qt/M6zT2bwWh7c0MRhn5ENM0EdM+eQ2M/FkjOKwMLgwCmDwCxEVVr7cxGg or2TROeCrQjiw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4YpFNk4cCnz4wyh; Thu, 6 Feb 2025 09:32:38 +1100 (AEDT) Date: Thu, 6 Feb 2025 09:31:09 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] passt-repair: Build fixes for musl Message-ID: References: <20250205160006.3780783-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="WBNfElZwZnekLg6h" Content-Disposition: inline In-Reply-To: <20250205160006.3780783-1-sbrivio@redhat.com> Message-ID-Hash: BEBUZ4ORZW552DUDOTMSJTTWYEY53B73 X-Message-ID-Hash: BEBUZ4ORZW552DUDOTMSJTTWYEY53B73 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 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: --WBNfElZwZnekLg6h Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Feb 05, 2025 at 05:00:06PM +0100, Stefano Brivio wrote: > When building against musl headers: >=20 > - sizeof() needs sttdef.h, as it should be; >=20 > - we can't initialise a struct msghdr by simply listing fields in > order, as they contain explicit padding fields. Use field names > instead. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > passt-repair.c | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) >=20 > diff --git a/passt-repair.c b/passt-repair.c > index 6f79423..3c3247b 100644 > --- a/passt-repair.c > +++ b/passt-repair.c > @@ -21,6 +21,7 @@ > #include > #include > #include > +#include > #include > #include > #include > @@ -75,7 +76,11 @@ int main(int argc, char **argv) > } > =20 > iov =3D (struct iovec){ &cmd, sizeof(cmd) }; > - msg =3D (struct msghdr){ NULL, 0, &iov, 1, buf, sizeof(buf), 0 }; > + msg =3D (struct msghdr){ .msg_name =3D NULL, .msg_namelen =3D 0, > + .msg_iov =3D &iov, .msg_iovlen =3D 1, > + .msg_control =3D buf, > + .msg_controllen =3D sizeof(buf), > + .msg_flags =3D 0 }; > cmsg =3D CMSG_FIRSTHDR(&msg); > =20 > if (argc !=3D 2) { --=20 David Gibson (he or they) | 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 --WBNfElZwZnekLg6h Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmej5qgACgkQzQJF27ox 2GeisQ/+PcVcLK8SFLkSxaVRU9J6ZTjAJjpVxAAKF6I67aTgoPtaAMupdsAySwpC kvMSj7lGfkQ4+VW2lYZxxUxBwsNi7hEUZf0Bjfu3dqKhok7l48hNsM1bsuS686pi U37/Qi4037RHNgLXPYyGMjTeZkHx+QXiGbYr6xK1DRzKtU/D8ntVffhO+EddLU0t nU9UlNvm8LSwqPc47VZ4tppEKQh1NVOfpvOupDopay78GpbnDRFMniL8e5/kU6QQ y36Bn/YPcVmzVk1ggQTSHEt/xAxqyt6Cqk/gduXR4UfoTpPmp/48dmTXw+zr7Wkc DEsiO2CX9kQ+7tNuaxKvK3kj0HuK1omhflDwaSgK1ypoGT8VBqQOeqRRMOLRPD/X Nic24WuHC5ikwB6edHMAkOPba9BYyh3ts4Fcle//4pq9jh/ZxaaMOtnu146IH64l wOMCVZkyPJ+5J4E8jKtHExVPkXL7yxwR5t9lCMXKKhDJPnbzbK88GTJwZtS+dHd0 IbJzeZk/7RALwuQ3ybzwuvX06GrZHRqFLN4gBlsJQy5mVAHwL5TijD0C/sIcETWL nK4bIzeF82XmNaU46ifRooBrzDGvQC2xF4cpiQxQ/4lGNxOCfn+zunOrBdOInug4 nFRDXFQNfyBjtoIB97JiAhKukN0bq5agyKGWtyBmLiVlMg9mZrs= =1dTF -----END PGP SIGNATURE----- --WBNfElZwZnekLg6h--