Skip to content

Commit ee95ae2

Browse files
author
Maksim Panfilov
committed
cp: fix Ioctl casting for ppc64 (Closes: #8161)
1 parent aa42a02 commit ee95ae2

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

src/uu/cp/src/platform/linux.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ where
6262
let dst_file = File::create(&dest)?;
6363
let src_fd = src_file.as_raw_fd();
6464
let dst_fd = dst_file.as_raw_fd();
65-
// Using .try_into().unwrap() is required as glibc, musl & android all have different type for ioctl()
66-
#[allow(clippy::unnecessary_fallible_conversions)]
6765
let result = unsafe {
6866
libc::ioctl(
6967
dst_fd,
70-
linux_raw_sys::ioctl::FICLONE.try_into().unwrap(),
68+
linux_raw_sys::ioctl::FICLONE as libc::Ioctl,
7169
src_fd,
7270
)
7371
};

0 commit comments

Comments
 (0)