Skip to content

Commit

Permalink
Fix building on musl (#34)
Browse files Browse the repository at this point in the history
#33 introduced a compile error when targeting (at least) `-musl` but
possibly other unixes.
  • Loading branch information
Jake-Shadle committed Sep 29, 2023
1 parent 6b01f07 commit f4a0f3f
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 f4a0f3f

Please sign in to comment.