Skip to content

Commit 103b878

Browse files
asomerstgross35
authored andcommitted
On FreeBSD, set the ELF symbol version for readdir_r
This function will probably be removed in FreeBSD 16. But the old symbol will remain, for backwards-compatibility. Set the symbol version now, so that the current version of libc will still be able to compile on future versions of FreeBSD. (backport <#4694>) (cherry picked from commit 3908285)
1 parent f63029d commit 103b878

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/unix/mod.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,10 @@ cfg_if! {
17451745
all(target_os = "freebsd", any(freebsd11, freebsd10)),
17461746
link_name = "readdir_r@FBSD_1.0"
17471747
)]
1748+
#[cfg_attr(
1749+
all(target_os = "freebsd", not(any(freebsd11, freebsd10))),
1750+
link_name = "readdir_r@FBSD_1.5"
1751+
)]
17481752
#[allow(non_autolinks)] // FIXME(docs): `<>` breaks line length limit.
17491753
/// The 64-bit libc on Solaris and illumos only has readdir_r. If a
17501754
/// 32-bit Solaris or illumos target is ever created, it should use

0 commit comments

Comments
 (0)