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 DFA635A0272 for ; Wed, 27 Dec 2023 04:55:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gibson.dropbear.id.au; s=202312; t=1703649330; bh=Tk6ry2HsHx127Ee8dKVybYXTwqb9K8Y20/Z0+rQh7AA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Fu88lME0cbHUXBYa3RI/nDViiWLLy4CgcxwjzWsXSWZzidom4gUWNwrgF/9u0FPgq j2I7Q6GmxFlr0b1OGbpHPlZAWnqLP+h94Qpu+DAk35EaMBpDIosPjTTpCjl/xflalX PfnOuppD7G7m9Qlib7OaMpnIf54JM+tLcPm1NQYOba7GFpKTCvMm/bsEU49t/Ze10a 2L/D4uxnn+57KPutrfz5XkpMN7qFihbKkidzhfMlEyeSi1B40aYwTt2fqjuvs3Qcyv NFqg1sE43PyIKDTOGd+qJhLbHLDBuROaUQBomOH2bNpEm4OjiVvhU4qhZZa7dEtap7 4sB58ORY1LwTw== Received: by gandalf.ozlabs.org (Postfix, from userid 1007) id 4T0Hq60VmQz4wdC; Wed, 27 Dec 2023 14:55:30 +1100 (AEDT) Date: Wed, 27 Dec 2023 14:40:17 +1100 From: David Gibson To: Stefano Brivio Subject: Re: [PATCH] tcp: Cast timeval fields to unsigned long long for printing Message-ID: References: <20231224174107.1176748-1-sbrivio@redhat.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="BrjcQVPfBSH33Jw9" Content-Disposition: inline In-Reply-To: <20231224174107.1176748-1-sbrivio@redhat.com> Message-ID-Hash: JMWT7UGWWRAXCECXNC2OD6L6LLDVL2AJ X-Message-ID-Hash: JMWT7UGWWRAXCECXNC2OD6L6LLDVL2AJ 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: --BrjcQVPfBSH33Jw9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Dec 24, 2023 at 06:41:07PM +0100, Stefano Brivio wrote: > On x32, glibc defines time_t and suseconds_t (the latter, also known as > __syscall_slong_t) as unsigned long long, whereas "everywhere else", > including x86_64 and i686, those are unsigned long. >=20 > See also https://sourceware.org/bugzilla/show_bug.cgi?id=3D16437 for > all the gory details. >=20 > Signed-off-by: Stefano Brivio Reviewed-by: David Gibson > --- > tcp.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) >=20 > diff --git a/tcp.c b/tcp.c > index f506cfd..1e4d2fa 100644 > --- a/tcp.c > +++ b/tcp.c > @@ -727,8 +727,9 @@ static void tcp_timer_ctl(const struct ctx *c, struct= tcp_tap_conn *conn) > it.it_value.tv_sec =3D ACT_TIMEOUT; > } > =20 > - flow_dbg(conn, "timer expires in %lu.%03lus", it.it_value.tv_sec, > - it.it_value.tv_nsec / 1000 / 1000); > + flow_dbg(conn, "timer expires in %llu.%03llus", > + (unsigned long long)it.it_value.tv_sec, > + (unsigned long long)it.it_value.tv_nsec / 1000 / 1000); > =20 > timerfd_settime(conn->timer, 0, &it, NULL); > } --=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 --BrjcQVPfBSH33Jw9 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEO+dNsU4E3yXUXRK2zQJF27ox2GcFAmWLnKAACgkQzQJF27ox 2GdNpQ//Tu//Yhuy8YBBF4b8KCLJEbnWvn8ZDoE+Ob4kNXaJ2YeVCasdxZprOH4Q nSfJQSIbwmB+W7j341dOmdXYX/7ANszSCKO1uuoGEvsYOlQqmEtaTVPxT6SMAk93 ffJ5HnlktYcuJRw5zYp4VhQOv9ZCbf6jwfdjhLiAL3+luiRsJL7OaF3j7I7FkJD7 28iIt6kYaZs0KAlolwDhC+vV1VUWEkjumzfwokOVRxA2Y4yjJvAwHb446HR509pE omFB6BPx62QbjXSaEcScx2q23cPdbfwpxkeFOa+HM9eyHm07At3x0W9gaSRnv9bj ddR9esqXVK7SyTkHYky7wqw2zYV5AMLibsVVhZYcyrQ2lCQsSsGqq9uT3pjcF37p h4VTvkFZOKZpNzvnGxJ9b6qk+PidaqQXkjmgT6DJxi20bmNaua5d99tpb7FtzQK/ qlWvqVjFgSY1W0WCFqus6RNIV7su3lQEkJeRONw8huxZJx4+/PsckxjEDTjd3d3p G4c/DCKUtD/lkDJH1LcTYhXjo9DdpuZ76b/kIcUwRnQsNU612VzhFe1LnGYTdfg9 Afi9Qo/dD8mUvHecO148mWmuhqQcbkGqGE/TWwECoLOYvH1aYKlYJ3rk5TrVas/u qafD3uo5vZxFLb+BEj41PT0g4H5VIX+3jLIQEUq7PdRdfgg+VH8= =NFep -----END PGP SIGNATURE----- --BrjcQVPfBSH33Jw9--