Upstream has resolved musl builds differently.

Signed-off-by: Alex Kiernan <[email protected]>
---

 .../0001-Replace-LFS-functions.patch          | 91 -------------------
 .../thin-provisioning-tools_1.0.9.bb          |  1 -
 2 files changed, 92 deletions(-)
 delete mode 100644 
meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch

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 a9f1c8601d9b..000000000000
--- 
a/meta-oe/recipes-support/thin-provisioning-tools/thin-provisioning-tools/0001-Replace-LFS-functions.patch
+++ /dev/null
@@ -1,91 +0,0 @@
-From 289105253fbf342fd22cbcde2ccc1127f732ab09 Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 7 Jul 2023 14:21:17 -0700
-Subject: [PATCH] Replace LFS functions
-
-The original functions are able to consume 64bit off_t now a days
-therefore *64 equivalents can be replaced, as a side it fixes build with
-musl.
-
-Upstream-Status: Submitted 
[https://github.com/jthornber/thin-provisioning-tools/pull/267]
-Signed-off-by: Khem Raj <[email protected]>
----
- src/file_utils.rs     | 10 +++++-----
- src/io_engine/base.rs |  4 ++--
- src/thin/trim.rs      |  2 +-
- 3 files changed, 8 insertions(+), 8 deletions(-)
-
-diff --git a/src/file_utils.rs b/src/file_utils.rs
-index 0ca3c0f..d2b3ee9 100644
---- a/src/file_utils.rs
-+++ b/src/file_utils.rs
-@@ -11,18 +11,18 @@ fn test_bit(mode: u32, flag: u32) -> bool {
-     (mode & libc::S_IFMT) == flag
- }
- 
--fn is_file_or_blk_(info: &libc::stat64) -> bool {
-+fn is_file_or_blk_(info: &libc::stat) -> bool {
-     test_bit(info.st_mode, libc::S_IFBLK) || test_bit(info.st_mode, 
libc::S_IFREG)
- }
- 
- // wrapper of libc::stat64
--fn libc_stat64(path: &Path) -> io::Result<libc::stat64> {
-+fn libc_stat64(path: &Path) -> io::Result<libc::stat> {
-     let c_path = std::ffi::CString::new(path.as_os_str().as_bytes())
-         .map_err(|e| io::Error::new(io::ErrorKind::InvalidInput, 
e.to_string()))?;
- 
-     unsafe {
--        let mut st: libc::stat64 = std::mem::zeroed();
--        let r = libc::stat64(c_path.as_ptr(), &mut st);
-+        let mut st: libc::stat = std::mem::zeroed();
-+        let r = libc::stat(c_path.as_ptr(), &mut st);
-         if r == 0 {
-             Ok(st)
-         } else {
-@@ -56,7 +56,7 @@ fn get_device_size<P: AsRef<Path>>(path: P) -> 
io::Result<u64> {
-     let fd = file.as_raw_fd();
-     let mut cap = 0u64;
-     unsafe {
--        if libc::ioctl(fd, BLKGETSIZE64 as libc::c_ulong, &mut cap) == 0 {
-+        if libc::ioctl(fd, BLKGETSIZE64 as libc::c_int, &mut cap) == 0 {
-             Ok(cap)
-         } else {
-             Err(io::Error::last_os_error())
-diff --git a/src/io_engine/base.rs b/src/io_engine/base.rs
-index 725ebf7..db6209f 100644
---- a/src/io_engine/base.rs
-+++ b/src/io_engine/base.rs
-@@ -115,7 +115,7 @@ pub trait VectoredIo {
- 
- fn read_vectored_at(file: &File, bufs: &mut [libc::iovec], pos: u64) -> 
io::Result<usize> {
-     let ptr = bufs.as_ptr();
--    let ret = match unsafe { libc::preadv64(file.as_raw_fd(), ptr, bufs.len() 
as i32, pos as i64) }
-+    let ret = match unsafe { libc::preadv(file.as_raw_fd(), ptr, bufs.len() 
as i32, pos as i64) }
-     {
-         -1 => return Err(io::Error::last_os_error()),
-         n => n,
-@@ -125,7 +125,7 @@ fn read_vectored_at(file: &File, bufs: &mut [libc::iovec], 
pos: u64) -> io::Resu
- 
- fn write_vectored_at(file: &File, bufs: &[libc::iovec], pos: u64) -> 
io::Result<usize> {
-     let ptr = bufs.as_ptr();
--    let ret = match unsafe { libc::pwritev64(file.as_raw_fd(), ptr, 
bufs.len() as i32, pos as i64) }
-+    let ret = match unsafe { libc::pwritev(file.as_raw_fd(), ptr, bufs.len() 
as i32, pos as i64) }
-     {
-         -1 => return Err(io::Error::last_os_error()),
-         n => n,
-diff --git a/src/thin/trim.rs b/src/thin/trim.rs
-index 3d938ca..91a53dd 100644
---- a/src/thin/trim.rs
-+++ b/src/thin/trim.rs
-@@ -135,7 +135,7 @@ impl<'a> Iterator for RangeIterator<'a> {
- const BLKDISCARD: u32 = 0x1277;
- fn ioctl_blkdiscard(fd: i32, range: &[u64; 2]) -> std::io::Result<()> {
-     unsafe {
--        if libc::ioctl(fd, BLKDISCARD as libc::c_ulong, range) == 0 {
-+        if libc::ioctl(fd, BLKDISCARD as libc::c_int, range) == 0 {
-             Ok(())
-         } else {
-             Err(std::io::Error::last_os_error())
--- 
-2.41.0
-
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 b643ad6dc8d3..b79fdb1a0b5b 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"
 SRC_URI = " \
     
git://github.com/jthornber/thin-provisioning-tools;branch=main;protocol=https \
     "
-SRC_URI:append:libc-musl = " file://0001-Replace-LFS-functions.patch"
 
 SRCREV = "1d60839b0a920df6476712b80f933854fb32e160"
 UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
-- 
2.39.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#108235): 
https://lists.openembedded.org/g/openembedded-devel/message/108235
Mute This Topic: https://lists.openembedded.org/mt/103680232/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to