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;
365
365
pub const POSIX_MADV_WILLNEED : :: c_int = 3 ;
366
366
pub const POSIX_MADV_DONTNEED : :: c_int = 4 ;
367
367
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
+
368
375
pub const _SC_IOV_MAX: :: c_int = 56 ;
369
376
pub const _SC_GETGR_R_SIZE_MAX: :: c_int = 70 ;
370
377
pub const _SC_GETPW_R_SIZE_MAX: :: c_int = 71 ;
@@ -630,6 +637,10 @@ extern {
630
637
hdtr : * mut :: sf_hdtr ,
631
638
sbytes : * mut :: off_t ,
632
639
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
+
633
644
}
634
645
635
646
cfg_if ! {
Original file line number Diff line number Diff line change @@ -534,6 +534,13 @@ pub const SPLICE_F_GIFT: ::c_uint = 0x08;
534
534
535
535
pub const RTLD_LOCAL : :: c_int = 0 ;
536
536
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
+
537
544
f ! {
538
545
pub fn FD_CLR ( fd: :: c_int, set: * mut fd_set) -> ( ) {
539
546
let fd = fd as usize ;
@@ -642,6 +649,9 @@ extern {
642
649
iov : * const :: iovec ,
643
650
nr_segs : :: size_t ,
644
651
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 ;
645
655
}
646
656
647
657
cfg_if ! {
You can’t perform that action at this time.
0 commit comments