diff options
author | Luca Pizzamiglio <luca.pizzamiglio@gmail.com> | 2019-07-21 17:49:08 +0200 |
---|---|---|
committer | Luca Pizzamiglio <luca.pizzamiglio@gmail.com> | 2019-07-28 23:00:53 +0200 |
commit | 4a74f1e0df84257aac462b725f14b080da703037 (patch) | |
tree | a97dc37015301ca669c3855d67eaa8bbbe22e704 /build.rs | |
parent | 2b01f7e67322175e05f25325e6e941aa9a3ddeae (diff) | |
download | rust-libc-4a74f1e0df84257aac462b725f14b080da703037.tar.gz |
Add support for FreeBSD CURRENT (aka freebsd13)
Currently, libc supports and detects freebsd11 and freebsd13
Unknown versions, like freebsd13, is treated as freebsd11.
This patch solve the issues, detecting freebsd13 and treating it like
freebsd12.
Inverting the logic not(freebsd12) -> freebsd11 where possible
Diffstat (limited to 'build.rs')
-rw-r--r-- | build.rs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -19,6 +19,9 @@ fn main() { if let Some(12) = which_freebsd() { println!("cargo:rustc-cfg=freebsd12"); } + if let Some(13) = which_freebsd() { + println!("cargo:rustc-cfg=freebsd13"); + } } // Rust >= 1.15 supports private module use: @@ -100,6 +103,7 @@ fn which_freebsd() -> Option<i32> { match &stdout { s if s.starts_with("11") => Some(11), s if s.starts_with("12") => Some(12), + s if s.starts_with("13") => Some(13), _ => None, } } |