This patch fixes assuming a 64-bit toolchain. https://github.com/nicokoch/reflink/pull/5 --- reflink-0.1.3/src/sys/unix.rs 2019-04-02 16:13:06.000000000 +0200 +++ "reflink-0.1.3 (Kopie)/src/sys/unix.rs" 2023-06-29 09:47:26.867681403 +0200 @@ -7,7 +7,7 @@ use std::os::unix::io::AsRawFd; // TODO is this equal on all archs? Just tested on x86_64 and x86. - const IOCTL_FICLONE: u64 = 0x40049409; + macro_rules! IOCTL_FICLONE { () => (0x40049409) }; let src = fs::File::open(&from)?; @@ -18,7 +18,7 @@ .open(&to)?; let ret = unsafe { // http://man7.org/linux/man-pages/man2/ioctl_ficlonerange.2.html - libc::ioctl(dest.as_raw_fd(), IOCTL_FICLONE, src.as_raw_fd()) + libc::ioctl(dest.as_raw_fd(), IOCTL_FICLONE!(), src.as_raw_fd()) }; if ret == -1 {