Skip to content

Commit ce0eb23

Browse files
committed
Move RWF_* constants into linux/gnu/mod.rs
From `linux/mod.rs`. These constants are not exposed by musl so were causing failures in CI. These constants are really defined in `include/uapi/linux/fs.h` in Linux and are not specific to any libc and I hope to make them more available in the future.
1 parent 01f62b6 commit ce0eb23

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

src/unix/linux_like/linux/gnu/mod.rs

+9
Original file line numberDiff line numberDiff line change
@@ -860,6 +860,15 @@ pub const EPOLLWAKEUP: ::c_int = 0x20000000;
860860
pub const SEEK_DATA: ::c_int = 3;
861861
pub const SEEK_HOLE: ::c_int = 4;
862862

863+
// linux/fs.h
864+
865+
// Flags for preadv2/pwritev2
866+
pub const RWF_HIPRI: ::c_int = 0x00000001;
867+
pub const RWF_DSYNC: ::c_int = 0x00000002;
868+
pub const RWF_SYNC: ::c_int = 0x00000004;
869+
pub const RWF_NOWAIT: ::c_int = 0x00000008;
870+
pub const RWF_APPEND: ::c_int = 0x00000010;
871+
863872
// linux/rtnetlink.h
864873
pub const TCA_PAD: ::c_ushort = 9;
865874
pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10;

src/unix/linux_like/linux/mod.rs

-7
Original file line numberDiff line numberDiff line change
@@ -1440,13 +1440,6 @@ pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1;
14401440
pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2;
14411441
pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4;
14421442

1443-
// Flags for preadv2/pwritev2
1444-
pub const RWF_HIPRI: ::c_int = 0x00000001;
1445-
pub const RWF_DSYNC: ::c_int = 0x00000002;
1446-
pub const RWF_SYNC: ::c_int = 0x00000004;
1447-
pub const RWF_NOWAIT: ::c_int = 0x00000008;
1448-
pub const RWF_APPEND: ::c_int = 0x00000010;
1449-
14501443
pub const AIO_CANCELED: ::c_int = 0;
14511444
pub const AIO_NOTCANCELED: ::c_int = 1;
14521445
pub const AIO_ALLDONE: ::c_int = 2;

0 commit comments

Comments
 (0)