Skip to content

Commit d87405d

Browse files
committed
Fix POSIX_MADV_DONTNEED definition for emscripten
1 parent 66c7d05 commit d87405d

File tree

6 files changed

+15
-6
lines changed

6 files changed

+15
-6
lines changed

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub type loff_t = ::c_longlong;
44
pub type ino_t = u64;
55
pub type off_t = i64;
66
pub type blkcnt_t = i64;
7-
pub type blksize_t = c_long;
7+
pub type blksize_t = ::c_long;
88
pub type fsblkcnt_t = ::c_ulonglong;
99
pub type fsfilcnt_t = ::c_ulonglong;
1010
pub type dev_t = u64;
@@ -249,6 +249,8 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
249249
pub const ERFKILL: ::c_int = 132;
250250
pub const EHWPOISON: ::c_int = 133;
251251

252+
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
253+
252254
pub const SO_REUSEADDR: ::c_int = 2;
253255
pub const SO_TYPE: ::c_int = 3;
254256
pub const SO_ERROR: ::c_int = 4;

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,8 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
249249
pub const ERFKILL: ::c_int = 132;
250250
pub const EHWPOISON: ::c_int = 133;
251251

252+
pub const POSIX_MADV_DONTNEED: ::c_int = 0;
253+
252254
pub const SO_REUSEADDR: ::c_int = 2;
253255
pub const SO_TYPE: ::c_int = 3;
254256
pub const SO_ERROR: ::c_int = 4;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub type loff_t = ::c_longlong;
44
pub type ino_t = u64;
55
pub type off_t = i64;
66
pub type blkcnt_t = i64;
7-
pub type blksize_t = c_long;
7+
pub type blksize_t = ::c_long;
88
pub type fsblkcnt_t = ::c_ulonglong;
99
pub type fsfilcnt_t = ::c_ulonglong;
1010
pub type dev_t = u64;
@@ -251,6 +251,8 @@ pub const ENOTRECOVERABLE: ::c_int = 166;
251251
pub const EHWPOISON: ::c_int = 168;
252252
pub const ERFKILL: ::c_int = 167;
253253

254+
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
255+
254256
pub const SOCK_STREAM: ::c_int = 2;
255257
pub const SOCK_DGRAM: ::c_int = 1;
256258
pub const SOCK_SEQPACKET: ::c_int = 5;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ pub type loff_t = ::c_longlong;
44
pub type ino_t = u64;
55
pub type off_t = i64;
66
pub type blkcnt_t = i64;
7-
pub type blksize_t = c_long;
7+
pub type blksize_t = ::c_long;
88
pub type fsblkcnt_t = ::c_ulonglong;
99
pub type fsfilcnt_t = ::c_ulonglong;
1010
pub type dev_t = u64;
@@ -262,6 +262,8 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
262262
pub const ERFKILL: ::c_int = 132;
263263
pub const EHWPOISON: ::c_int = 133;
264264

265+
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
266+
265267
pub const SO_REUSEADDR: ::c_int = 2;
266268
pub const SO_TYPE: ::c_int = 3;
267269
pub const SO_ERROR: ::c_int = 4;

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ pub type loff_t = ::c_longlong;
66
pub type ino_t = u64;
77
pub type off_t = i64;
88
pub type blkcnt_t = i64;
9-
pub type blksize_t = c_long;
9+
pub type blksize_t = ::c_long;
1010
pub type fsblkcnt_t = ::c_ulonglong;
1111
pub type fsfilcnt_t = ::c_ulonglong;
1212
pub type dev_t = u64;
@@ -276,6 +276,8 @@ pub const ENOTRECOVERABLE: ::c_int = 131;
276276
pub const ERFKILL: ::c_int = 132;
277277
pub const EHWPOISON: ::c_int = 133;
278278

279+
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
280+
279281
pub const SO_REUSEADDR: ::c_int = 2;
280282
pub const SO_TYPE: ::c_int = 3;
281283
pub const SO_ERROR: ::c_int = 4;

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

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,10 +124,9 @@ pub const O_ACCMODE: ::c_int = 0o10000003;
124124
pub const O_NDELAY: ::c_int = O_NONBLOCK;
125125
pub const NI_MAXHOST: ::socklen_t = 255;
126126
pub const PTHREAD_STACK_MIN: ::size_t = 2048;
127-
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
128127
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
129128

130-
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
129+
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
131130

132131
pub const RLIM_INFINITY: ::rlim_t = !0;
133132
pub const RLIMIT_RTTIME: ::c_int = 15;

0 commit comments

Comments
 (0)