From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 1B37140419 for ; Mon, 24 Jan 2022 12:40:58 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 22CEA68AFEC; Mon, 24 Jan 2022 14:40:56 +0200 (EET) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id D500468AEEA for ; Mon, 24 Jan 2022 14:40:49 +0200 (EET) Received: from localhost (213-47-68-29.cable.dynamic.surfer.at [213.47.68.29]) (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id AD5CEFF812 for ; Mon, 24 Jan 2022 12:40:48 +0000 (UTC) Date: Mon, 24 Jan 2022 13:40:47 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20220124124047.GC2829255@pb2> References: <20220123115700.GB2829255@pb2> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH] Fix setsockopt IP_MULTICAST_TTL on OpenBSD X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: multipart/mixed; boundary="===============0793237778261193964==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============0793237778261193964== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="8DhXBlVgk3ubzLvM" Content-Disposition: inline --8DhXBlVgk3ubzLvM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Jan 23, 2022 at 02:55:38PM -0500, Brad Smith wrote: > On 1/23/2022 6:57 AM, Michael Niedermayer wrote: >=20 > > On Wed, Jan 12, 2022 at 12:13:13AM -0500, Brad Smith wrote: > > > Fix setsockopt() usage on OpenBSD with IP_MULTICAST_TTL. The field > > > type should be an unsigned char on anything but Linux. > > >=20 > > >=20 > > > diff --git a/libavformat/udp.c b/libavformat/udp.c > > > index 180d96a988..29aa865fff 100644 > > > --- a/libavformat/udp.c > > > +++ b/libavformat/udp.c > > > @@ -163,7 +163,13 @@ static int udp_set_multicast_ttl(int sockfd, int= mcastTTL, > > > { > > > #ifdef IP_MULTICAST_TTL > > > if (addr->sa_family =3D=3D AF_INET) { > > > - if (setsockopt(sockfd, IPPROTO_IP, IP_MULTICAST_TTL, &mcastT= TL, sizeof(mcastTTL)) < 0) { > > > +#ifdef __linux__ > > > + int ttl =3D mcastTTL; > > > +#else > > > + unsigned char ttl =3D mcastTTL; > > > +#endif > > this "ifdef __linux__" feels like the wrong thing to check, dont you ag= ree ? >=20 > Not sure what you mean. "__linux__" seems the wrong property to check for this is not #ifdef __linux__ osname =3D "linux" #else i would have expected more something like #if HAVE_INT_TTL int ttl =3D mcastTTL; #else or maybe even something along the lines of WHATEVER_TTL_TYPE ttl =3D mcastTTL; thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope --8DhXBlVgk3ubzLvM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iFwEABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCYe6eSwAKCRBhHseHBAsP qyRsAJinjnPo8h+8O/h11Po4WJ8BTIwNAJwL3hIe+YbHgK9ecv+2+ZQk3EC8QQ== =miqG -----END PGP SIGNATURE----- --8DhXBlVgk3ubzLvM-- --===============0793237778261193964== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". --===============0793237778261193964==--