Skip to content

Commit 3908285

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.
1 parent d52be20 commit 3908285

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
@@ -1758,6 +1758,10 @@ cfg_if! {
17581758
all(target_os = "freebsd", any(freebsd11, freebsd10)),
17591759
link_name = "readdir_r@FBSD_1.0"
17601760
)]
1761+
#[cfg_attr(
1762+
all(target_os = "freebsd", not(any(freebsd11, freebsd10))),
1763+
link_name = "readdir_r@FBSD_1.5"
1764+
)]
17611765
#[allow(non_autolinks)] // FIXME(docs): `<>` breaks line length limit.
17621766
/// The 64-bit libc on Solaris and illumos only has readdir_r. If a
17631767
/// 32-bit Solaris or illumos target is ever created, it should use

0 commit comments

Comments
 (0)