diff options
Diffstat (limited to 'filesystems/sandboxfs/files')
-rw-r--r-- | filesystems/sandboxfs/files/patch-powerpc | 62 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-src_lib.rs | 15 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-src_nodes_conv.rs | 41 | ||||
-rw-r--r-- | filesystems/sandboxfs/files/patch-src_nodes_mod.rs | 23 |
4 files changed, 141 insertions, 0 deletions
diff --git a/filesystems/sandboxfs/files/patch-powerpc b/filesystems/sandboxfs/files/patch-powerpc new file mode 100644 index 000000000000..df525d6e5b13 --- /dev/null +++ b/filesystems/sandboxfs/files/patch-powerpc @@ -0,0 +1,62 @@ +--- cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/mod.rs.orig 2020-03-17 20:35:43 UTC ++++ cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/mod.rs +@@ -1486,6 +1486,9 @@ cfg_if! { + } else if #[cfg(target_arch = "powerpc64")] { + mod powerpc64; + pub use self::powerpc64::*; ++ } else if #[cfg(target_arch = "powerpc")] { ++ mod powerpc; ++ pub use self::powerpc::*; + } else { + // Unknown target_arch + } +--- cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/powerpc.rs.orig 2021-06-23 22:40:24 UTC ++++ cargo-crates/libc-0.2.69/src/unix/bsd/freebsdlike/freebsd/powerpc.rs +@@ -0,0 +1,47 @@ ++pub type c_char = u8; ++pub type c_long = i32; ++pub type c_ulong = u32; ++pub type wchar_t = i32; ++pub type time_t = i64; ++pub type suseconds_t = i32; ++pub type register_t = i32; ++ ++s! { ++ pub struct stat { ++ pub st_dev: ::dev_t, ++ pub st_ino: ::ino_t, ++ pub st_mode: ::mode_t, ++ pub st_nlink: ::nlink_t, ++ pub st_uid: ::uid_t, ++ pub st_gid: ::gid_t, ++ pub st_rdev: ::dev_t, ++ pub st_atime: ::time_t, ++ pub st_atime_nsec: ::c_long, ++ pub st_mtime: ::time_t, ++ pub st_mtime_nsec: ::c_long, ++ pub st_ctime: ::time_t, ++ pub st_ctime_nsec: ::c_long, ++ pub st_size: ::off_t, ++ pub st_blocks: ::blkcnt_t, ++ pub st_blksize: ::blksize_t, ++ pub st_flags: ::fflags_t, ++ pub st_gen: u32, ++ pub st_lspare: i32, ++ pub st_birthtime: ::time_t, ++ pub st_birthtime_nsec: ::c_long, ++ } ++} ++ ++// should be pub(crate), but that requires Rust 1.18.0 ++cfg_if! { ++ if #[cfg(libc_const_size_of)] { ++ #[doc(hidden)] ++ pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; ++ } else { ++ #[doc(hidden)] ++ pub const _ALIGNBYTES: usize = 4 - 1; ++ } ++} ++ ++pub const MAP_32BIT: ::c_int = 0x00080000; ++pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 diff --git a/filesystems/sandboxfs/files/patch-src_lib.rs b/filesystems/sandboxfs/files/patch-src_lib.rs new file mode 100644 index 000000000000..ffee85062382 --- /dev/null +++ b/filesystems/sandboxfs/files/patch-src_lib.rs @@ -0,0 +1,15 @@ +--- src/lib.rs.orig 2020-04-20 18:46:46 UTC ++++ src/lib.rs +@@ -463,10 +463,10 @@ impl SandboxFS { + #[cfg(target_os = "linux")] + let code = Errno::ENODATA; + +- #[cfg(target_os = "macos")] ++ #[cfg(any(target_os = "dragonfly", target_os = "freebsd", target_os = "macos"))] + let code = Errno::ENOATTR; + +- #[cfg(not(any(target_os = "linux", target_os = "macos")))] ++ #[cfg(not(any(target_os = "dragonfly", target_os = "freebsd", target_os = "linux", target_os = "macos")))] + compile_error!("Don't know what error to return on a missing getxattr"); + + Err(KernelError::from_errno(code)) diff --git a/filesystems/sandboxfs/files/patch-src_nodes_conv.rs b/filesystems/sandboxfs/files/patch-src_nodes_conv.rs new file mode 100644 index 000000000000..949974945d2c --- /dev/null +++ b/filesystems/sandboxfs/files/patch-src_nodes_conv.rs @@ -0,0 +1,41 @@ +Unbreak on i386 + +error[E0308]: mismatched types + --> src/nodes/conv.rs:72:19 + | +72 | Timespec::new(val.tv_sec() as sys::time::time_t, usec) + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected i64, found i32 + +--- src/nodes/conv.rs.orig 2020-04-20 18:46:46 UTC ++++ src/nodes/conv.rs +@@ -69,7 +69,7 @@ pub fn timeval_to_timespec(val: sys::time::TimeVal) -> + } else { + val.tv_usec() as i32 + }; +- Timespec::new(val.tv_sec() as sys::time::time_t, usec) ++ Timespec::new((val.tv_sec() as sys::time::time_t).into(), usec) + } + + /// Converts a `sys::time::TimeVal` object into a `sys::time::TimeSpec`. +@@ -328,6 +328,10 @@ mod tests { + // modified and may not be queryable, so stub them out. + attr.ctime = BAD_TIME; + attr.crtime = BAD_TIME; ++ // Ignore rdev too ++ attr.rdev = 0; ++ // XXX: gid is always 0 when the tests run on tmpfs(5) ++ attr.gid = exp_attr.gid; + assert!(fileattrs_eq(&exp_attr, &attr)); + } + +@@ -365,6 +369,10 @@ mod tests { + // modified and may not be queryable, so stub them out. + attr.ctime = BAD_TIME; + attr.crtime = BAD_TIME; ++ // Ignore rdev too ++ attr.rdev = 0; ++ // XXX: gid is always 0 when the tests run on tmpfs(5) ++ attr.gid = exp_attr.gid; + assert!(fileattrs_eq(&exp_attr, &attr)); + } + diff --git a/filesystems/sandboxfs/files/patch-src_nodes_mod.rs b/filesystems/sandboxfs/files/patch-src_nodes_mod.rs new file mode 100644 index 000000000000..696e611469c7 --- /dev/null +++ b/filesystems/sandboxfs/files/patch-src_nodes_mod.rs @@ -0,0 +1,23 @@ +libc crate defines ENOTSUP as an alias for EOPNOTSUPP. nix crate +does not re-export EOPNOTSUPP on FreeBSD but ENOTSUP is available. + +--- src/nodes/mod.rs.orig 2020-04-20 18:46:46 UTC ++++ src/nodes/mod.rs +@@ -97,7 +97,7 @@ fn setattr_mode(attr: &mut fuse::FileAttr, path: Optio + if attr.kind == fuse::FileType::Symlink { + // TODO(jmmv): Should use NoFollowSymlink to support changing the mode of a symlink if + // requested to do so, but this is not supported on Linux. +- return Err(nix::Error::from_errno(Errno::EOPNOTSUPP)); ++ return Err(nix::Error::from_errno(Errno::ENOTSUP)); + } + + let result = try_path(path, |p| +@@ -144,7 +144,7 @@ fn setattr_times(attr: &mut fuse::FileAttr, path: Opti + if attr.kind == fuse::FileType::Symlink { + eprintln!( + "utimensat not present; ignoring request to change symlink times for {:?}", path); +- Err(nix::Error::from_errno(Errno::EOPNOTSUPP)) ++ Err(nix::Error::from_errno(Errno::ENOTSUP)) + } else { + try_path(path, |p| sys::stat::utimes(p, &atime, &mtime)) + } |