+1
−0
src/linux/glibc_compat.cpp
0 → 100644
+124
−0
Loading
Rust's std built by rustc for *-linux-gnu calls the LFS "64" variants
through the libc crate -- linking hello world failed on mmap64/open64.
off_t and struct stat/dirent are 64-bit on every systempp target, so each
is the plain function, as in musl: stat64 fstat64 lstat64 fstatat64
open64 openat64 creat64 lseek64 mmap64 pread64 pwrite64 ftruncate64
truncate64 sendfile64 posix_fadvise64 posix_fallocate64 readdir64
fopen64 freopen64 fseeko64 ftello64 tmpfile64 getrlimit64 setrlimit64
statfs64 fstatfs64. The headers already mapped these names with macros
(enough for C), so the file #undefs them. Also gnu_get_libc_version
("2.41": std asks it to pick glibc workarounds, none apply),
gnu_get_libc_release and __res_init.
Co-Authored-By:
Claude Opus 5.5 <noreply@anthropic.com>