Skip to content

Commit

Permalink
Fix building on musl
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake-Shadle committed Sep 29, 2023
1 parent 6b01f07 commit 04e7ec5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/flock/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ pub(super) fn lock(file: &File, state: LockState, timeout: Option<Duration>) ->
// nice, so we use a simpler approach of just spawning a thread and sending
// a signal to it ourselves. Less efficient probably, but IMO cleaner
let file_ptr = file as *const _ as usize;
let mut thread_id: libc::pthread_t = 0;
let mut thread_id: libc::pthread_t = unsafe { std::mem::zeroed() };
let tid = &mut thread_id as *mut _ as usize;
let (tx, rx) = std::sync::mpsc::channel();
let lock_thread = std::thread::Builder::new()
Expand Down

0 comments on commit 04e7ec5

Please sign in to comment.