Skip to content

Commit c107c77

Browse files
Mr2Brainlesstgross35
authored andcommitted
linux: Added _IO, _IOW, _IOR, _IOWR to the exported API
(backport <rust-lang#4325>) (cherry picked from commit cf6113d)
1 parent 56330cd commit c107c77

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

libc-test/semver/linux.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3553,9 +3553,13 @@ _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
35533553
_CS_POSIX_V7_LPBIG_OFFBIG_LIBS
35543554
_CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS
35553555
_CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
3556+
_IO
35563557
_IOFBF
35573558
_IOLBF
35583559
_IONBF
3560+
_IOR
3561+
_IOW
3562+
_IOWR
35593563
_PC_2_SYMLINKS
35603564
_PC_ALLOC_SIZE_MIN
35613565
_PC_ASYNC_IO

src/unix/linux_like/linux/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5939,22 +5939,22 @@ const fn _IOC(dir: u32, ty: u32, nr: u32, size: usize) -> u32 {
59395939
}
59405940

59415941
/// Build an ioctl number for an argumentless ioctl.
5942-
pub(crate) const fn _IO(ty: u32, nr: u32) -> u32 {
5942+
pub const fn _IO(ty: u32, nr: u32) -> u32 {
59435943
_IOC(_IOC_NONE, ty, nr, 0)
59445944
}
59455945

59465946
/// Build an ioctl number for an read-only ioctl.
5947-
pub(crate) const fn _IOR<T>(ty: u32, nr: u32) -> u32 {
5947+
pub const fn _IOR<T>(ty: u32, nr: u32) -> u32 {
59485948
_IOC(_IOC_READ, ty, nr, size_of::<T>())
59495949
}
59505950

59515951
/// Build an ioctl number for an write-only ioctl.
5952-
pub(crate) const fn _IOW<T>(ty: u32, nr: u32) -> u32 {
5952+
pub const fn _IOW<T>(ty: u32, nr: u32) -> u32 {
59535953
_IOC(_IOC_WRITE, ty, nr, size_of::<T>())
59545954
}
59555955

59565956
/// Build an ioctl number for a read-write ioctl.
5957-
pub(crate) const fn _IOWR<T>(ty: u32, nr: u32) -> u32 {
5957+
pub const fn _IOWR<T>(ty: u32, nr: u32) -> u32 {
59585958
_IOC(_IOC_READ | _IOC_WRITE, ty, nr, size_of::<T>())
59595959
}
59605960

0 commit comments

Comments
 (0)