Skip to content

Commit

Permalink
Merge pull request #562 from jbaublitz/issue-devicemapper-rs-560
Browse files Browse the repository at this point in the history
Fix issue of devicemapper-rs compatibility with musl
  • Loading branch information
mulkieran authored Jul 13, 2020
2 parents 3f18196 + 616fcce commit d211952
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/core/dm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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::{
Expand Down Expand Up @@ -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())) }
Expand Down

0 comments on commit d211952

Please sign in to comment.