gentoo-overlay/sys-fs/stratisd/files/0001-Fix-issue-of-devicemap...

36 lines
1.1 KiB
Diff
Raw Normal View History

From 616fccece704b632427f9c8e1b7d2a4c8b7907d1 Mon Sep 17 00:00:00 2001
From: John Baublitz <jbaublitz@redhat.com>
Date: Thu, 9 Jul 2020 15:41:54 -0400
Subject: [PATCH] Fix issue of devicemapper-rs compatibility with musl
---
src/core/dm.rs | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/src/core/dm.rs b/src/core/dm.rs
index fe598c6..3c6d925 100644
--- a/src/core/dm.rs
+++ b/src/core/dm.rs
@@ -4,7 +4,7 @@
use std::{cmp, fs::File, mem::size_of, os::unix::io::AsRawFd, slice, u32};
-use nix::libc::{c_ulong, ioctl as nix_ioctl};
+use nix::libc::ioctl as nix_ioctl;
use crate::{
core::{
@@ -136,8 +136,7 @@ impl DM {
.as_mut()
.expect("pointer to own structure v can not be NULL")
};
- let op =
- request_code_readwrite!(DM_IOCTL, ioctl, size_of::<dmi::Struct_dm_ioctl>()) as c_ulong;
+ let op = request_code_readwrite!(DM_IOCTL, ioctl, size_of::<dmi::Struct_dm_ioctl>());
loop {
if let Err(err) =
unsafe { convert_ioctl_res!(nix_ioctl(self.file.as_raw_fd(), op, v.as_mut_ptr())) }
--
2.26.2