Skip to content

Commit 660a4fe

Browse files
committed
Add chown/fchown
1 parent 81e250f commit 660a4fe

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

src/redox/mod.rs

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,15 @@ pub const O_NOFOLLOW: ::c_int = 0x8000_0000;
8686
pub const O_ACCMODE: ::c_int = O_RDONLY | O_WRONLY | O_RDWR;
8787

8888
extern {
89-
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
90-
pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t)
91-
-> ::ssize_t;
92-
pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t)
93-
-> ::ssize_t;
94-
pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
89+
pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int;
9590
pub fn close(fd: ::c_int) -> ::c_int;
96-
pub fn setenv(name: *const c_char, val: *const c_char,
97-
overwrite: ::c_int) -> ::c_int;
91+
pub fn fchown(fd: ::c_int, uid: ::uid_t, gid: ::gid_t) -> ::c_int;
92+
pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int;
93+
pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void;
94+
pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) -> ::ssize_t;
95+
pub fn setenv(name: *const c_char, val: *const c_char, overwrite: ::c_int) -> ::c_int;
9896
pub fn unsetenv(name: *const c_char) -> ::c_int;
97+
pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t;
9998
}
10099

101100
#[link(name = "c")]

0 commit comments

Comments
 (0)