|
@@ -84,6 +84,10 @@ pub fn fchown(fildes: c_int, owner: uid_t, group: gid_t) -> c_int {
|
|
|
e(unsafe { syscall!(FCHOWN, fildes, owner, group) }) as c_int
|
|
|
}
|
|
|
|
|
|
+pub fn flock(fd: c_int, operation: c_int) -> c_int {
|
|
|
+ e(unsafe { syscall!(FLOCK, fd, operation) }) as c_int
|
|
|
+}
|
|
|
+
|
|
|
pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int {
|
|
|
let empty_cstr: *const c_char = unsafe { ::cstr_from_bytes_with_nul_unchecked(b"\0") };
|
|
|
e(unsafe { syscall!(NEWFSTATAT, fildes, empty_cstr, buf, AT_EMPTY_PATH) }) as c_int
|