You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to compile rustix on 32-bit macOS systems.
This means that fix_y2038 is set to true, unlike on 64-bit systems.
The first error is in src/backend/libc/fs/syscalls.rs, where the system attempts a Linux fix.
A possible fix is below.
--- a/src/backend/libc/fs/syscalls.rs
+++ b/src/backend/libc/fs/syscalls.rs
@@ -803,7 +803,7 @@ pub(crate) fn utimensat(
) -> io::Result<()> {
// Old 32-bit version: libc has `utimensat` but it is not y2038 safe by
// default. But there may be a `__utimensat16` we can use.
- #[cfg(fix_y2038)]
+ #[cfg(all(fix_y2038, not(apple)))]
{
#[cfg(target_env = "gnu")]
if let Some(libc_utimensat) = __utimensat64.get() {
@@ -1505,7 +1505,7 @@ fn libc_statvfs_to_statvfs(from: c::statvfs) -> StatVfs {
pub(crate) fn futimens(fd: BorrowedFd<'_>, times: &Timestamps) -> io::Result<()> {
// Old 32-bit version: libc has `futimens` but it is not y2038 safe by
// default. But there may be a `__futimens64` we can use.
- #[cfg(fix_y2038)]
+ #[cfg(all(fix_y2038, not(apple)))]
{
#[cfg(target_env = "gnu")]
if let Some(libc_futimens) = __futimens64.get() {
With that patch, the following four lines of code cause errors because of type incapabilities. Timespec and c::timespec are not type aliases of one another when fix_y2038 is true.
I am afraid I am not very proficient in Rust yet.
I would be happy to try to put together a pull request with a little guidance.
I am trying to compile rustix on 32-bit macOS systems.
This means that
fix_y2038
is set to true, unlike on 64-bit systems.The first error is in src/backend/libc/fs/syscalls.rs, where the system attempts a Linux fix.
A possible fix is below.
With that patch, the following four lines of code cause errors because of type incapabilities.
Timespec
andc::timespec
are not type aliases of one another whenfix_y2038
is true.I am afraid I am not very proficient in Rust yet.
I would be happy to try to put together a pull request with a little guidance.
The text was updated successfully, but these errors were encountered: