Skip to content

Commit 53c6b31

Browse files
committed
Moved dirent to generic.rs
1 parent b9c8323 commit 53c6b31

File tree

8 files changed

+12
-18
lines changed

8 files changed

+12
-18
lines changed

src/unix/newlib/aarch64/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,4 @@ pub const MSG_WAITALL: ::c_int = 0;
5151
pub const MSG_MORE: ::c_int = 0;
5252
pub const MSG_NOSIGNAL: ::c_int = 0;
5353

54-
pub use crate::unix::newlib::generic::{sigset_t, stat};
54+
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};

src/unix/newlib/arm/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ pub const MSG_WAITALL: ::c_int = 0;
5353
pub const MSG_MORE: ::c_int = 0;
5454
pub const MSG_NOSIGNAL: ::c_int = 0;
5555

56-
pub use crate::unix::newlib::generic::{sigset_t, stat};
56+
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};

src/unix/newlib/dirent.rs

Lines changed: 0 additions & 7 deletions
This file was deleted.

src/unix/newlib/espidf/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,4 +107,4 @@ extern "C" {
107107
pub fn eventfd(initval: ::c_uint, flags: ::c_int) -> ::c_int;
108108
}
109109

110-
pub use crate::unix::newlib::generic::{sigset_t, stat};
110+
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};

src/unix/newlib/generic.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,10 @@ s! {
2424
pub st_blocks: ::blkcnt_t,
2525
pub st_spare4: [::c_long; 2usize],
2626
}
27+
28+
pub struct dirent {
29+
pub d_ino: ::ino_t,
30+
pub d_type: ::c_uchar,
31+
pub d_name: [::c_char; 256usize],
32+
}
2733
}

src/unix/newlib/horizon/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -266,3 +266,5 @@ extern "C" {
266266

267267
pub fn gethostid() -> ::c_long;
268268
}
269+
270+
pub use crate::unix::newlib::generic::dirent;

src/unix/newlib/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -786,13 +786,6 @@ cfg_if! {
786786
}
787787
}
788788

789-
cfg_if! {
790-
if #[cfg(not(target_os = "vita"))] {
791-
mod dirent;
792-
pub use self::dirent::*;
793-
}
794-
}
795-
796789
cfg_if! {
797790
if #[cfg(libc_align)] {
798791
#[macro_use]

src/unix/newlib/powerpc/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ pub type wchar_t = ::c_int;
55
pub type c_long = i32;
66
pub type c_ulong = u32;
77

8-
pub use crate::unix::newlib::generic::{sigset_t, stat};
8+
pub use crate::unix::newlib::generic::{dirent, sigset_t, stat};
99

1010
// the newlib shipped with devkitPPC does not support the following components:
1111
// - sockaddr

0 commit comments

Comments
 (0)