File tree Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Expand file tree Collapse file tree 2 files changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -365,6 +365,13 @@ pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
365365pub const POSIX_MADV_WILLNEED : :: c_int = 3 ;
366366pub const POSIX_MADV_DONTNEED : :: c_int = 4 ;
367367
368+ pub const POSIX_FADV_NORMAL : :: c_int = 0 ;
369+ pub const POSIX_FADV_RANDOM : :: c_int = 1 ;
370+ pub const POSIX_FADV_SEQUENTIAL : :: c_int = 2 ;
371+ pub const POSIX_FADV_WILLNEED : :: c_int = 3 ;
372+ pub const POSIX_FADV_DONTNEED : :: c_int = 4 ;
373+ pub const POSIX_FADV_NOREUSE : :: c_int = 5 ;
374+
368375pub const _SC_IOV_MAX: :: c_int = 56 ;
369376pub const _SC_GETGR_R_SIZE_MAX: :: c_int = 70 ;
370377pub const _SC_GETPW_R_SIZE_MAX: :: c_int = 71 ;
@@ -630,6 +637,10 @@ extern {
630637 hdtr : * mut :: sf_hdtr ,
631638 sbytes : * mut :: off_t ,
632639 flags : :: c_int ) -> :: c_int ;
640+
641+ pub fn posix_fadvise ( fd : :: c_int , offset : :: off_t , len : :: off_t ,
642+ advise : :: c_int ) -> :: c_int ;
643+
633644}
634645
635646cfg_if ! {
Original file line number Diff line number Diff line change @@ -534,6 +534,13 @@ pub const SPLICE_F_GIFT: ::c_uint = 0x08;
534534
535535pub const RTLD_LOCAL : :: c_int = 0 ;
536536
537+ pub const POSIX_FADV_NORMAL : :: c_int = 0 ;
538+ pub const POSIX_FADV_RANDOM : :: c_int = 1 ;
539+ pub const POSIX_FADV_SEQUENTIAL : :: c_int = 2 ;
540+ pub const POSIX_FADV_WILLNEED : :: c_int = 3 ;
541+ pub const POSIX_FADV_DONTNEED : :: c_int = 4 ;
542+ pub const POSIX_FADV_NOREUSE : :: c_int = 5 ;
543+
537544f ! {
538545 pub fn FD_CLR ( fd: :: c_int, set: * mut fd_set) -> ( ) {
539546 let fd = fd as usize ;
@@ -642,6 +649,9 @@ extern {
642649 iov : * const :: iovec ,
643650 nr_segs : :: size_t ,
644651 flags : :: c_uint ) -> :: ssize_t ;
652+
653+ pub fn posix_fadvise ( fd : :: c_int , offset : :: off_t , len : :: off_t ,
654+ advise : :: c_int ) -> :: c_int ;
645655}
646656
647657cfg_if ! {
You can’t perform that action at this time.
0 commit comments