Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Sep 2025 17:01:16 +0200
From:      =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@FreeBSD.org>
To:        Alan Somers <asomers@freebsd.org>
Cc:        Mark Millard <marklmi@yahoo.com>,  FreeBSD Current <freebsd-current@freebsd.org>,  Konstantin Belousov <kib@freebsd.org>
Subject:   Re: git: d549de769055 - main - libc: Remove readdir_r(3) [This broke building rust 1.88]
Message-ID:  <86zfb1ghj7.fsf@ltc.des.dev>
In-Reply-To: <CAOtMX2gJJ-wGtK3%2BQwyz_eODYWK6pwaMA6gbnN74Pvqc1QW6Mw@mail.gmail.com> (Alan Somers's message of "Thu, 11 Sep 2025 07:44:11 -0600")
References:  <1F6A4621-1505-4F78-97C6-85EA556B2165@yahoo.com> <86bjnhi7s2.fsf@ltc.des.dev> <CAOtMX2gJJ-wGtK3%2BQwyz_eODYWK6pwaMA6gbnN74Pvqc1QW6Mw@mail.gmail.com>

index | next in thread | previous in thread | raw e-mail

Alan Somers <asomers@freebsd.org> writes:
> Dag-Erling Smørgrav <des@freebsd.org> writes:
> > Tell that to the Rust developers.  They have been repeatedly warned
> > against using readdir_r(3) for years, as far back as 2016.
> Have they?  Looking at rust's github page, I see discussions about
> using readdir_r on Fuchsia and Linux, but nothing about BSD.

If you look at these tickets, there are people pointing out that
readdir_r() doesn't work correctly even on platforms where it isn't
formally deprecated.  The Rust developers chose to fix the Linux case
because it produced a link-time warning and ignored the rest.  That's on
them.

They also seem to be providing their own prototype for readdir_r(),
which suppresses the deprecation warning they should be getting on
FreeBSD 15, and turns the issue from a failure to compile into a failure
to link.  That's also on them.

> possibly with the aid of installing misc/compat14x

That won't make any difference since readdir_r() is still in our libc.

DES
-- 
Dag-Erling Smørgrav - des@FreeBSD.org


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86zfb1ghj7.fsf>