fix test and example

This commit is contained in:
Jorge Aparicio 2017-01-13 00:09:10 -05:00
parent 490dbc9a3b
commit 0950e37073
2 changed files with 5 additions and 5 deletions

View file

@ -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 {

View file

@ -8,18 +8,18 @@
// 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));
} }
} }
#[cfg(any(target_os="linux", target_os="freebsd"))] #[cfg(any(target_os = "linux", target_os = "freebsd"))]
#[test] #[test]
fn getpid_macro() { fn getpid_macro() {
unsafe { unsafe {