Skip to content

Commit 118c7ae

Browse files
authored
Merge pull request #1236 from MikaelUrankar/freebsd_arm
Add FreeBSD armv6 and armv7 targets
2 parents 42cd3ba + e628de2 commit 118c7ae

File tree

2 files changed

+43
-0
lines changed

2 files changed

+43
-0
lines changed
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
pub type c_char = u8;
2+
pub type c_long = i32;
3+
pub type c_ulong = u32;
4+
pub type time_t = i64;
5+
pub type suseconds_t = i32;
6+
7+
s! {
8+
pub struct stat {
9+
pub st_dev: ::dev_t,
10+
pub st_ino: ::ino_t,
11+
pub st_mode: ::mode_t,
12+
pub st_nlink: ::nlink_t,
13+
pub st_uid: ::uid_t,
14+
pub st_gid: ::gid_t,
15+
pub st_rdev: ::dev_t,
16+
pub st_atime: ::time_t,
17+
pub st_atime_nsec: ::c_long,
18+
pub st_atime_pad: ::c_long,
19+
pub st_mtime: ::time_t,
20+
pub st_mtime_nsec: ::c_long,
21+
pub st_mtime_pad: ::c_long,
22+
pub st_ctime: ::time_t,
23+
pub st_ctime_nsec: ::c_long,
24+
pub st_ctime_pad: ::c_long,
25+
pub st_size: ::off_t,
26+
pub st_blocks: ::blkcnt_t,
27+
pub st_blksize: ::blksize_t,
28+
pub st_flags: ::fflags_t,
29+
pub st_gen: ::uint32_t,
30+
pub st_lspare: ::int32_t,
31+
pub st_birthtime: ::time_t,
32+
pub st_birthtime_nsec: ::c_long,
33+
pub st_birthtime_pad: ::c_long,
34+
}
35+
}
36+
37+
// should be pub(crate), but that requires Rust 1.18.0
38+
#[doc(hidden)]
39+
pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1;
40+
pub const MAP_32BIT: ::c_int = 0x00080000;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1219,6 +1219,9 @@ cfg_if! {
12191219
} else if #[cfg(target_arch = "aarch64")] {
12201220
mod aarch64;
12211221
pub use self::aarch64::*;
1222+
} else if #[cfg(target_arch = "arm")] {
1223+
mod arm;
1224+
pub use self::arm::*;
12221225
} else {
12231226
// Unknown target_arch
12241227
}

0 commit comments

Comments
 (0)