@@ -4,6 +4,7 @@ pub type sa_family_t = u16;
4
4
pub type pthread_key_t = :: c_uint ;
5
5
pub type speed_t = :: c_uint ;
6
6
pub type tcflag_t = :: c_uint ;
7
+ pub type loff_t = :: c_longlong ;
7
8
8
9
pub enum timezone { }
9
10
@@ -526,6 +527,11 @@ pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000;
526
527
527
528
pub const WNOHANG : :: c_int = 1 ;
528
529
530
+ pub const SPLICE_F_MOVE : :: c_uint = 0x01 ;
531
+ pub const SPLICE_F_NONBLOCK : :: c_uint = 0x02 ;
532
+ pub const SPLICE_F_MORE : :: c_uint = 0x04 ;
533
+ pub const SPLICE_F_GIFT : :: c_uint = 0x08 ;
534
+
529
535
f ! {
530
536
pub fn FD_CLR ( fd: :: c_int, set: * mut fd_set) -> ( ) {
531
537
let fd = fd as usize ;
@@ -616,6 +622,21 @@ extern {
616
622
pub fn fstatfs ( fd : :: c_int , buf : * mut statfs ) -> :: c_int ;
617
623
pub fn memrchr ( cx : * const :: c_void , c : :: c_int , n : :: size_t ) -> * mut :: c_void ;
618
624
pub fn syscall ( num : :: c_long , ...) -> :: c_long ;
625
+ pub fn splice ( fd_in : :: c_int ,
626
+ off_in : * mut :: loff_t ,
627
+ fd_out : :: c_int ,
628
+ off_out : * mut :: loff_t ,
629
+ len : :: size_t ,
630
+ flags : :: c_uint ) -> :: ssize_t ;
631
+ pub fn tee ( fd_in : :: c_int ,
632
+ fd_out : :: c_int ,
633
+ len : :: size_t ,
634
+ flags : :: c_uint ) -> :: ssize_t ;
635
+ pub fn vmsplice ( fd : :: c_int ,
636
+ iov : * const :: iovec ,
637
+ nr_segs : :: size_t ,
638
+ flags : :: c_uint ) -> :: ssize_t ;
639
+
619
640
}
620
641
621
642
cfg_if ! {
0 commit comments