fix test and example
This commit is contained in:
parent
490dbc9a3b
commit
0950e37073
|
@ -8,7 +8,7 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate syscall;
|
extern crate sc;
|
||||||
|
|
||||||
fn write(fd: usize, buf: &[u8]) {
|
fn write(fd: usize, buf: &[u8]) {
|
||||||
unsafe {
|
unsafe {
|
||||||
|
|
|
@ -8,14 +8,14 @@
|
||||||
// except according to those terms.
|
// except according to those terms.
|
||||||
|
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate syscall;
|
extern crate sc;
|
||||||
|
|
||||||
// getpid() is POSIX but that doesn't guarantee it's a system call.
|
// getpid() is POSIX but that doesn't guarantee it's a system call.
|
||||||
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
#[cfg(any(target_os = "linux", target_os = "freebsd"))]
|
||||||
#[test]
|
#[test]
|
||||||
fn getpid() {
|
fn getpid() {
|
||||||
unsafe {
|
unsafe {
|
||||||
assert!(0 < syscall::syscall0(syscall::nr::GETPID));
|
assert!(0 < sc::syscall0(sc::nr::GETPID));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue