Skip to content

Commit 084e473

Browse files
committed
Fix loff_t, ino_t, off_t, blkcnt_t, blksize_t, fsblkcnt_t, fsfilcnt_t definitions for emscripten
1 parent 2ca0849 commit 084e473

File tree

11 files changed

+40
-8
lines changed

11 files changed

+40
-8
lines changed

src/unix/notbsd/android/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ pub type clock_t = ::c_long;
66
pub type time_t = ::c_long;
77
pub type suseconds_t = ::c_long;
88
pub type off_t = ::c_long;
9+
pub type loff_t = ::c_longlong;
910
pub type blkcnt_t = ::c_ulong;
1011
pub type blksize_t = ::c_ulong;
1112
pub type nlink_t = u32;

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
pub type loff_t = ::c_longlong;
2+
13
pub const CLONE_NEWCGROUP: ::c_int = 0x02000000;
24

35
pub const SFD_CLOEXEC: ::c_int = 0x080000;

src/unix/notbsd/linux/musl/b32/arm.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
pub type c_char = u8;
22
pub type wchar_t = u32;
3+
pub type loff_t = ::c_longlong;
4+
pub type ino_t = u64;
5+
pub type off_t = i64;
6+
pub type blkcnt_t = i64;
7+
pub type blksize_t = c_long;
8+
pub type fsblkcnt_t = ::c_ulonglong;
9+
pub type fsfilcnt_t = ::c_ulonglong;
310

411
s! {
512
pub struct stat {

src/unix/notbsd/linux/musl/b32/asmjs.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
pub type c_char = i8;
22
pub type wchar_t = i32;
3+
pub type loff_t = i32;
4+
pub type ino_t = u32;
5+
pub type off_t = i32;
6+
pub type blkcnt_t = i32;
7+
pub type blksize_t = i32;
8+
pub type fsblkcnt_t = u32;
9+
pub type fsfilcnt_t = u32;
310

411
s! {
512
pub struct stat {

src/unix/notbsd/linux/musl/b32/mips.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
pub type c_char = i8;
22
pub type wchar_t = ::c_int;
3+
pub type loff_t = ::c_longlong;
4+
pub type ino_t = u64;
5+
pub type off_t = i64;
6+
pub type blkcnt_t = i64;
7+
pub type blksize_t = c_long;
8+
pub type fsblkcnt_t = ::c_ulonglong;
9+
pub type fsfilcnt_t = ::c_ulonglong;
310

411
s! {
512
pub struct stat {

src/unix/notbsd/linux/musl/b32/x86.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
pub type c_char = i8;
22
pub type wchar_t = i32;
3+
pub type loff_t = ::c_longlong;
4+
pub type ino_t = u64;
5+
pub type off_t = i64;
6+
pub type blkcnt_t = i64;
7+
pub type blksize_t = c_long;
8+
pub type fsblkcnt_t = ::c_ulonglong;
9+
pub type fsfilcnt_t = ::c_ulonglong;
310

411
s! {
512
pub struct stat {

src/unix/notbsd/linux/musl/b64/mod.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ pub type wchar_t = i32;
22
pub type c_long = i64;
33
pub type c_ulong = u64;
44
pub type nlink_t = u64;
5+
pub type loff_t = ::c_longlong;
6+
pub type ino_t = u64;
7+
pub type off_t = i64;
8+
pub type blkcnt_t = i64;
9+
pub type blksize_t = c_long;
10+
pub type fsblkcnt_t = ::c_ulonglong;
11+
pub type fsfilcnt_t = ::c_ulonglong;
512

613
s! {
714
pub struct stat {

src/unix/notbsd/linux/musl/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,6 @@
11
pub type clock_t = c_long;
22
pub type time_t = c_long;
33
pub type suseconds_t = c_long;
4-
pub type ino_t = u64;
5-
pub type off_t = i64;
6-
pub type blkcnt_t = i64;
7-
8-
pub type blksize_t = c_long;
9-
pub type fsblkcnt_t = ::c_ulonglong;
10-
pub type fsfilcnt_t = ::c_ulonglong;
114
pub type rlim_t = ::c_ulonglong;
125

136
s! {

src/unix/notbsd/linux/other/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
pub type loff_t = ::c_longlong;
12
pub type fsblkcnt_t = ::c_ulong;
23
pub type fsfilcnt_t = ::c_ulong;
34
pub type rlim_t = c_ulong;

src/unix/notbsd/linux/s390x.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ pub type fsfilcnt_t = u64;
88
pub type ino_t = u64;
99
pub type nlink_t = u64;
1010
pub type off_t = i64;
11+
pub type loff_t = ::c_longlong;
1112
pub type rlim_t = u64;
1213
pub type suseconds_t = i64;
1314
pub type time_t = i64;

0 commit comments

Comments
 (0)