Skip to content

Commit c9a3dc8

Browse files
committed
mman: Use libc_bitflags macro for ProtFlags
This serves as an example use of the libc_bitflags macro.
1 parent b4c9f5b commit c9a3dc8

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/sys/mman.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ use std::os::unix::io::RawFd;
66

77
pub use self::consts::*;
88

9-
bitflags!{
9+
libc_bitflags!{
1010
flags ProtFlags : libc::c_int {
11-
const PROT_NONE = libc::PROT_NONE,
12-
const PROT_READ = libc::PROT_READ,
13-
const PROT_WRITE = libc::PROT_WRITE,
14-
const PROT_EXEC = libc::PROT_EXEC,
11+
PROT_NONE,
12+
PROT_READ,
13+
PROT_WRITE,
14+
PROT_EXEC,
1515
#[cfg(any(target_os = "linux", target_os = "android"))]
16-
const PROT_GROWSDOWN = libc::PROT_GROWSDOWN,
16+
PROT_GROWSDOWN,
1717
#[cfg(any(target_os = "linux", target_os = "android"))]
18-
const PROT_GROWSUP = libc::PROT_GROWSUP,
18+
PROT_GROWSUP,
1919
}
2020
}
2121

0 commit comments

Comments
 (0)