Skip to content

Commit 8436a44

Browse files
committed
core: try to fix arch- and platform-specific fallout from 2db3abd
1 parent aebbd6b commit 8436a44

File tree

2 files changed

+19
-0
lines changed

2 files changed

+19
-0
lines changed

src/libcore/libc.rs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,12 @@ pub mod types {
394394
pub type ssize_t = i64;
395395
}
396396
pub mod posix01 {
397+
use libc::types::os::arch::c95::{c_long, time_t};
398+
use libc::types::os::arch::c99::{uint8_t, uint32_t, int32_t};
399+
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t};
400+
use libc::types::os::arch::posix88::{mode_t, off_t};
401+
use libc::types::os::arch::posix88::{uid_t};
402+
397403
pub type nlink_t = u16;
398404
pub type blksize_t = i64;
399405
pub type blkcnt_t = i64;
@@ -436,6 +442,12 @@ pub mod types {
436442
pub mod os {
437443
pub mod common {
438444
pub mod posix01 {
445+
use libc::types::os::arch::c95::{c_int, c_short};
446+
use libc::types::os::arch::c99::int64_t;
447+
use libc::types::os::arch::extra::time64_t;
448+
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t};
449+
use libc::types::os::arch::posix88::mode_t;
450+
439451
// Note: this is the struct called stat64 in win32. Not stat,
440452
// nor stati64.
441453
pub struct stat {
@@ -576,6 +588,11 @@ pub mod types {
576588
pub type ssize_t = i32;
577589
}
578590
pub mod posix01 {
591+
use libc::types::os::arch::c95::{c_long, time_t};
592+
use libc::types::os::arch::c99::{uint32_t, int32_t, int64_t};
593+
use libc::types::os::arch::posix88::{dev_t, gid_t, ino_t,
594+
mode_t, uid_t};
595+
579596
pub type nlink_t = u16;
580597
pub type blksize_t = i64;
581598
pub type blkcnt_t = i32;

src/libcore/to_bytes.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,8 @@ impl char: IterBytes {
172172

173173
#[cfg(target_word_size = "32")]
174174
pub mod x32 {
175+
use to_bytes::{Cb, IterBytes};
176+
175177
pub impl uint: IterBytes {
176178
#[inline(always)]
177179
pure fn iter_bytes(&self, lsb0: bool, f: Cb) {

0 commit comments

Comments
 (0)