Skip to content

Commit b42798d

Browse files
committed
Auto merge of #479 - nanosankaku:master, r=alexcrichton
Add binding for mremap. Please consider this PR. Let me know if you need things changed.
2 parents e49e9bb + 545f67d commit b42798d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/unix/notbsd/linux/mod.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -558,6 +558,9 @@ pub const LIO_NOP: ::c_int = 2;
558558
pub const LIO_WAIT: ::c_int = 0;
559559
pub const LIO_NOWAIT: ::c_int = 1;
560560

561+
pub const MREMAP_MAYMOVE: ::c_int = 1;
562+
pub const MREMAP_FIXED: ::c_int = 2;
563+
561564
f! {
562565
pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () {
563566
for slot in cpuset.bits.iter_mut() {
@@ -773,6 +776,12 @@ extern {
773776
nbytes: ::off64_t, flags: ::c_uint) -> ::c_int;
774777
pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int;
775778
pub fn freeifaddrs(ifa: *mut ::ifaddrs);
779+
780+
pub fn mremap(addr: *mut ::c_void,
781+
len: ::size_t,
782+
new_len: ::size_t,
783+
flags: ::c_int,
784+
...) -> *mut ::c_void;
776785
}
777786

778787
cfg_if! {

0 commit comments

Comments
 (0)