Skip to content

Commit e16b11d

Browse files
author
Jorge Aparicio
committed
fix POSIX_FADV_*
1 parent e7480ed commit e16b11d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/unix/notbsd/linux/s390x.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -171,8 +171,8 @@ s! {
171171
}
172172
}
173173

174-
// FIXME POSIX_FADV_DONTNEED = 6
175-
// FIXME POSIX_FADV_NOREUSE = 7
174+
pub const POSIX_FADV_DONTNEED: ::c_int = 6;
175+
pub const POSIX_FADV_NOREUSE: ::c_int = 7;
176176

177177
pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4;
178178
pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4;

src/unix/notbsd/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,10 @@ pub const POSIX_FADV_NORMAL: ::c_int = 0;
613613
pub const POSIX_FADV_RANDOM: ::c_int = 1;
614614
pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
615615
pub const POSIX_FADV_WILLNEED: ::c_int = 3;
616+
// TODO modularize better
617+
#[cfg(targe_arch = "s390x")]
616618
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
619+
#[cfg(targe_arch = "s390x")]
617620
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
618621

619622
pub const AT_FDCWD: ::c_int = -100;

0 commit comments

Comments
 (0)