unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
blob 1fc877815f300cff5459a12452c9c5535fc4ea0b 847 bytes (raw)
name: gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch 	 # note: path name is non-authoritative(*)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
 
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 {

debug log:

solving 1fc877815f ...
found 1fc877815f in https://yhetil.org/guix-patches/a4c1019661374d47d4e94f2823f469e780b84589.1732814114.git.sughosha@disroot.org/

applying [1/1] https://yhetil.org/guix-patches/a4c1019661374d47d4e94f2823f469e780b84589.1732814114.git.sughosha@disroot.org/
diff --git a/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch b/gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch
new file mode 100644
index 0000000000..1fc877815f

1:7: trailing whitespace.
This patch fixes assuming a 64-bit toolchain.\r
1:8: trailing whitespace.
https://github.com/nicokoch/reflink/pull/5\r
1:9: trailing whitespace.
\r
1:10: trailing whitespace.
\r
1:11: trailing whitespace.
--- reflink-0.1.3/src/sys/unix.rs	2019-04-02 16:13:06.000000000 +0200\r
Checking patch gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch...
Applied patch gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch cleanly.
warning: squelched 18 whitespace errors
warning: 23 lines add whitespace errors.

index at:
100644 1fc877815f300cff5459a12452c9c5535fc4ea0b	gnu/packages/patches/rust-reflink-0.1-fix-64bit-toolchain-assumption.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).