Skip to content

Commit

Permalink
Try building on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
tnull committed Oct 18, 2022
1 parent 3782907 commit d0387d3
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -775,21 +775,18 @@ async fn start_ldk() {

#[tokio::main]
pub async fn main() {
#[cfg(not(target_os = "windows"))]
{
// Catch Ctrl-C with a dummy signal handler.
unsafe {
let mut new_action: libc::sigaction = core::mem::zeroed();
let mut old_action: libc::sigaction = core::mem::zeroed();
// Catch Ctrl-C with a dummy signal handler.
unsafe {
let mut new_action: libc::sigaction = core::mem::zeroed();
let mut old_action: libc::sigaction = core::mem::zeroed();

new_action.sa_sigaction = libc::SIG_IGN;
new_action.sa_sigaction = libc::SIG_IGN;

libc::sigaction(
libc::SIGINT,
&new_action as *const libc::sigaction,
&mut old_action as *mut libc::sigaction,
);
}
libc::sigaction(
libc::SIGINT,
&new_action as *const libc::sigaction,
&mut old_action as *mut libc::sigaction,
);
}

start_ldk().await;
Expand Down

0 comments on commit d0387d3

Please sign in to comment.