diff options
| author | Alex Kiernan <alex.kiernan@gmail.com> | 2024-01-12 10:15:10 +0000 |
|---|---|---|
| committer | Khem Raj <raj.khem@gmail.com> | 2024-01-12 08:51:11 -0800 |
| commit | b5343d2f3829fad2939b34fd81ee46dbf22f47e6 (patch) | |
| tree | 13e82c3700c0fb8f61ac445b24469c7d898b173c /meta-oe | |
| parent | 3449642b58069db86fae9c14c7665b87b7b99ae8 (diff) | |
| download | meta-openembedded-b5343d2f3829fad2939b34fd81ee46dbf22f47e6.tar.gz | |
thin-provisioning-tools: Drop musl fixes (fixed upstream)
Upstream has resolved musl builds differently.
Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'meta-oe')
2 files changed, 0 insertions, 92 deletions
diff --git a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch b/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch deleted file mode 100644 index a9f1c8601d..0000000000 --- a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch +++ /dev/null | |||
| @@ -1,91 +0,0 @@ | |||
| 1 | From 289105253fbf342fd22cbcde2ccc1127f732ab09 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Khem Raj <raj.khem@gmail.com> | ||
| 3 | Date: Fri, 7 Jul 2023 14:21:17 -0700 | ||
| 4 | Subject: [PATCH] Replace LFS functions | ||
| 5 | |||
| 6 | The original functions are able to consume 64bit off_t now a days | ||
| 7 | therefore *64 equivalents can be replaced, as a side it fixes build with | ||
| 8 | musl. | ||
| 9 | |||
| 10 | Upstream-Status: Submitted [https://github.com/jthornber/thin-provisioning-tools/pull/267] | ||
| 11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
| 12 | --- | ||
| 13 | src/file_utils.rs | 10 +++++----- | ||
| 14 | src/io_engine/base.rs | 4 ++-- | ||
| 15 | src/thin/trim.rs | 2 +- | ||
| 16 | 3 files changed, 8 insertions(+), 8 deletions(-) | ||
| 17 | |||
| 18 | diff --git a/src/file_utils.rs b/src/file_utils.rs | ||
| 19 | index 0ca3c0f..d2b3ee9 100644 | ||
| 20 | --- a/src/file_utils.rs | ||
| 21 | +++ b/src/file_utils.rs | ||
| 22 | @@ -11,18 +11,18 @@ fn test_bit(mode: u32, flag: u32) -> bool { | ||
| 23 | (mode & libc::S_IFMT) == flag | ||
| 24 | } | ||
| 25 | |||
| 26 | -fn is_file_or_blk_(info: &libc::stat64) -> bool { | ||
| 27 | +fn is_file_or_blk_(info: &libc::stat) -> bool { | ||
| 28 | test_bit(info.st_mode, libc::S_IFBLK) || test_bit(info.st_mode, libc::S_IFREG) | ||
| 29 | } | ||
| 30 | |||
| 31 | // wrapper of libc::stat64 | ||
| 32 | -fn libc_stat64(path: &Path) -> io::Result<libc::stat64> { | ||
| 33 | +fn libc_stat64(path: &Path) -> io::Result<libc::stat> { | ||
| 34 | let c_path = std::ffi::CString::new(path.as_os_str().as_bytes()) | ||
| 35 | .map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, e.to_string()))?; | ||
| 36 | |||
| 37 | unsafe { | ||
| 38 | - let mut st: libc::stat64 = std::mem::zeroed(); | ||
| 39 | - let r = libc::stat64(c_path.as_ptr(), &mut st); | ||
| 40 | + let mut st: libc::stat = std::mem::zeroed(); | ||
| 41 | + let r = libc::stat(c_path.as_ptr(), &mut st); | ||
| 42 | if r == 0 { | ||
| 43 | Ok(st) | ||
| 44 | } else { | ||
| 45 | @@ -56,7 +56,7 @@ fn get_device_size<P: AsRef<Path>>(path: P) -> io::Result<u64> { | ||
| 46 | let fd = file.as_raw_fd(); | ||
| 47 | let mut cap = 0u64; | ||
| 48 | unsafe { | ||
| 49 | - if libc::ioctl(fd, BLKGETSIZE64 as libc::c_ulong, &mut cap) == 0 { | ||
| 50 | + if libc::ioctl(fd, BLKGETSIZE64 as libc::c_int, &mut cap) == 0 { | ||
| 51 | Ok(cap) | ||
| 52 | } else { | ||
| 53 | Err(io::Error::last_os_error()) | ||
| 54 | diff --git a/src/io_engine/base.rs b/src/io_engine/base.rs | ||
| 55 | index 725ebf7..db6209f 100644 | ||
| 56 | --- a/src/io_engine/base.rs | ||
| 57 | +++ b/src/io_engine/base.rs | ||
| 58 | @@ -115,7 +115,7 @@ pub trait VectoredIo { | ||
| 59 | |||
| 60 | fn read_vectored_at(file: &File, bufs: &mut [libc::iovec], pos: u64) -> io::Result<usize> { | ||
| 61 | let ptr = bufs.as_ptr(); | ||
| 62 | - let ret = match unsafe { libc::preadv64(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } | ||
| 63 | + let ret = match unsafe { libc::preadv(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } | ||
| 64 | { | ||
| 65 | -1 => return Err(io::Error::last_os_error()), | ||
| 66 | n => n, | ||
| 67 | @@ -125,7 +125,7 @@ fn read_vectored_at(file: &File, bufs: &mut [libc::iovec], pos: u64) -> io::Resu | ||
| 68 | |||
| 69 | fn write_vectored_at(file: &File, bufs: &[libc::iovec], pos: u64) -> io::Result<usize> { | ||
| 70 | let ptr = bufs.as_ptr(); | ||
| 71 | - let ret = match unsafe { libc::pwritev64(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } | ||
| 72 | + let ret = match unsafe { libc::pwritev(file.as_raw_fd(), ptr, bufs.len() as i32, pos as i64) } | ||
| 73 | { | ||
| 74 | -1 => return Err(io::Error::last_os_error()), | ||
| 75 | n => n, | ||
| 76 | diff --git a/src/thin/trim.rs b/src/thin/trim.rs | ||
| 77 | index 3d938ca..91a53dd 100644 | ||
| 78 | --- a/src/thin/trim.rs | ||
| 79 | +++ b/src/thin/trim.rs | ||
| 80 | @@ -135,7 +135,7 @@ impl<'a> Iterator for RangeIterator<'a> { | ||
| 81 | const BLKDISCARD: u32 = 0x1277; | ||
| 82 | fn ioctl_blkdiscard(fd: i32, range: &[u64; 2]) -> std::io::Result<()> { | ||
| 83 | unsafe { | ||
| 84 | - if libc::ioctl(fd, BLKDISCARD as libc::c_ulong, range) == 0 { | ||
| 85 | + if libc::ioctl(fd, BLKDISCARD as libc::c_int, range) == 0 { | ||
| 86 | Ok(()) | ||
| 87 | } else { | ||
| 88 | Err(std::io::Error::last_os_error()) | ||
| 89 | -- | ||
| 90 | 2.41.0 | ||
| 91 | |||
diff --git a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb b/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb index b643ad6dc8..b79fdb1a0b 100644 --- a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb +++ b/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools_1.0.9.bb | |||
| @@ -10,7 +10,6 @@ S = "${WORKDIR}/git" | |||
| 10 | SRC_URI = " \ | 10 | SRC_URI = " \ |
| 11 | git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \ | 11 | git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \ |
| 12 | " | 12 | " |
| 13 | SRC_URI:append:libc-musl = " file://0001-Replace-LFS-functions.patch" | ||
| 14 | 13 | ||
| 15 | SRCREV = "1d60839b0a920df6476712b80f933854fb32e160" | 14 | SRCREV = "1d60839b0a920df6476712b80f933854fb32e160" |
| 16 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" | 15 | UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" |
