We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a5936e4 commit e3e92d7Copy full SHA for e3e92d7
src/ucontext.rs
@@ -1,5 +1,7 @@
1
use libc;
2
+#[cfg(not(target_env = "musl"))]
3
use {Errno, Result};
4
5
use std::mem;
6
7
#[derive(Clone, Copy)]
@@ -8,6 +10,7 @@ pub struct UContext {
8
10
}
9
11
12
impl UContext {
13
+ #[cfg(not(target_env = "musl"))]
14
pub fn get() -> Result<UContext> {
15
let mut context: libc::ucontext_t = unsafe { mem::uninitialized() };
16
let res = unsafe {
@@ -16,6 +19,7 @@ impl UContext {
19
Errno::result(res).map(|_| UContext { context: context })
17
20
18
21
22
23
pub fn set(&self) -> Result<()> {
24
25
libc::setcontext(&self.context as *const libc::ucontext_t)
0 commit comments