Skip to content

Commit

Permalink
Disable huge tables support for freebsd, since it doesn't support them.
Browse files Browse the repository at this point in the history
Closes #109
  • Loading branch information
RazrFalcon committed Dec 17, 2023
1 parent c173463 commit 55109c6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1412,7 +1412,7 @@ mod test {
extern crate tempfile;

#[cfg(unix)]
use crate::advice::{Advice, UncheckedAdvice};
use crate::advice::Advice;
use std::fs::{File, OpenOptions};
use std::io::{Read, Write};
use std::mem;
Expand Down
12 changes: 6 additions & 6 deletions src/unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,22 +26,22 @@ const MAP_POPULATE: libc::c_int = libc::MAP_POPULATE;
#[cfg(not(any(target_os = "linux", target_os = "android")))]
const MAP_POPULATE: libc::c_int = 0;

#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android"))]
const MAP_HUGETLB: libc::c_int = libc::MAP_HUGETLB;

#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android"))]
const MAP_HUGE_MASK: libc::c_int = libc::MAP_HUGE_MASK;

#[cfg(any(target_os = "linux", target_os = "freebsd", target_os = "android"))]
#[cfg(any(target_os = "linux", target_os = "android"))]
const MAP_HUGE_SHIFT: libc::c_int = libc::MAP_HUGE_SHIFT;

#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "android")))]
#[cfg(not(any(target_os = "linux", target_os = "android")))]
const MAP_HUGETLB: libc::c_int = 0;

#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "android")))]
#[cfg(not(any(target_os = "linux", target_os = "android")))]
const MAP_HUGE_MASK: libc::c_int = 0;

#[cfg(not(any(target_os = "linux", target_os = "freebsd", target_os = "android")))]
#[cfg(not(any(target_os = "linux", target_os = "android")))]
const MAP_HUGE_SHIFT: libc::c_int = 0;

#[cfg(any(
Expand Down

0 comments on commit 55109c6

Please sign in to comment.