Skip to content

Commit

Permalink
Merge pull request #2 from panicbit/fix
Browse files Browse the repository at this point in the history
Fix libc breakage
  • Loading branch information
vasi authored Feb 1, 2020
2 parents d108322 + f16ddbe commit fe66512
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/fuse_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::io;
use std::os::unix::fs::MetadataExt;
use std::path::Path;
use std::ptr::null_mut;
use std::mem;

use daemonize::Daemonize;
use fuse::{BackgroundSession, FileAttr, Filesystem, FileType, Session};
Expand Down Expand Up @@ -46,9 +47,11 @@ pub fn md_to_attrs(md: Metadata) -> FileAttr {
// cause a harmless extra attempt to unmount.
fn run_foreground<FS: Filesystem + Send>(sess: Session<FS>) {
// Block signals on all threads.
let mut sigset: sigset_t = 0 as sigset_t;
let sigsetp: *mut sigset_t = &mut sigset;
let mut sigset: sigset_t;
let sigsetp: *mut sigset_t;
unsafe {
sigset = mem::zeroed();
sigsetp = &mut sigset;
sigemptyset(sigsetp);
sigaddset(sigsetp, SIGINT);
pthread_sigmask(SIG_BLOCK, sigsetp, null_mut());
Expand Down

0 comments on commit fe66512

Please sign in to comment.