Skip to content

Commit

Permalink
Merge pull request #60 from hankbao/main
Browse files Browse the repository at this point in the history
Fix the manpage example
  • Loading branch information
Pat Hickey authored Dec 13, 2023
2 parents afcbd90 + 01c7317 commit 9f1631b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions examples/manpage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,9 @@ fn fault_handler_thread(uffd: Uffd) {
loop {
// See what poll() tells us about the userfaultfd

let pollfd = PollFd::new(&uffd, PollFlags::POLLIN);
let nready = poll(&mut [pollfd], -1).expect("poll");
let mut fds = [PollFd::new(&uffd, PollFlags::POLLIN)];
let nready = poll(&mut fds, -1).expect("poll");
let pollfd = fds[0];

println!("\nfault_handler_thread():");
let revents = pollfd.revents().unwrap();
Expand Down

0 comments on commit 9f1631b

Please sign in to comment.