sys-fs/stratisd: fix build devicemapper-rs with musl libc

pull/1/head
Alexander Miroshnichenko 2020-07-10 19:18:44 +03:00
parent 736c4d0994
commit d0f8e8d3f9
Signed by: alex
GPG Key ID: E93720C6C73A77F4
1 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,35 @@
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