Skip to content
Snippets Groups Projects
Commit 0bfcd7a1 authored by bors's avatar bors
Browse files

Auto merge of #617 - Mic92:dirfd, r=alexcrichton

Add dirfd on netbsd

follow up of https://github.com/rust-lang/libc/pull/571
parents c25d6570 2c8ad9b0
No related branches found
No related tags found
No related merge requests found
......@@ -644,6 +644,15 @@ pub const P_PGID: idtype_t = 4;
pub const B460800: ::speed_t = 460800;
pub const B921600: ::speed_t = 921600;
// dirfd() is a macro on netbsd to access
// the first field of the struct where dirp points to:
// http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36
f! {
pub fn dirfd(dirp: *mut ::DIR) -> ::c_int {
unsafe { *(dirp as *const ::c_int) }
}
}
extern {
pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int;
pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment