Skip to content

Commit 9921f03

Browse files
committed
Move POSIX_FADV_* to freebsd/mod.rs
1 parent 2921c2d commit 9921f03

File tree

2 files changed

+7
-13
lines changed

2 files changed

+7
-13
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,13 @@ pub const RLIM_NLIMITS: ::rlim_t = 13;
6161
pub const Q_GETQUOTA: ::c_int = 0x700;
6262
pub const Q_SETQUOTA: ::c_int = 0x800;
6363

64+
pub const POSIX_FADV_NORMAL: ::c_int = 0;
65+
pub const POSIX_FADV_RANDOM: ::c_int = 1;
66+
pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
67+
pub const POSIX_FADV_WILLNEED: ::c_int = 3;
68+
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
69+
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
70+
6471
extern {
6572
pub fn __error() -> *mut ::c_int;
6673
}

src/unix/bsd/freebsdlike/mod.rs

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -334,19 +334,6 @@ pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2;
334334
pub const POSIX_MADV_WILLNEED: ::c_int = 3;
335335
pub const POSIX_MADV_DONTNEED: ::c_int = 4;
336336

337-
#[cfg(not(target_os = "dragonfly"))]
338-
pub const POSIX_FADV_NORMAL: ::c_int = 0;
339-
#[cfg(not(target_os = "dragonfly"))]
340-
pub const POSIX_FADV_RANDOM: ::c_int = 1;
341-
#[cfg(not(target_os = "dragonfly"))]
342-
pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2;
343-
#[cfg(not(target_os = "dragonfly"))]
344-
pub const POSIX_FADV_WILLNEED: ::c_int = 3;
345-
#[cfg(not(target_os = "dragonfly"))]
346-
pub const POSIX_FADV_DONTNEED: ::c_int = 4;
347-
#[cfg(not(target_os = "dragonfly"))]
348-
pub const POSIX_FADV_NOREUSE: ::c_int = 5;
349-
350337
pub const _SC_IOV_MAX: ::c_int = 56;
351338
pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70;
352339
pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71;

0 commit comments

Comments
 (0)