summaryrefslogtreecommitdiff
path: root/libc-test
diff options
context:
space:
mode:
authorLuca Pizzamiglio <luca.pizzamiglio@gmail.com>2019-07-21 17:49:08 +0200
committerLuca Pizzamiglio <luca.pizzamiglio@gmail.com>2019-07-28 23:00:53 +0200
commit4a74f1e0df84257aac462b725f14b080da703037 (patch)
treea97dc37015301ca669c3855d67eaa8bbbe22e704 /libc-test
parent2b01f7e67322175e05f25325e6e941aa9a3ddeae (diff)
downloadrust-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 'libc-test')
-rw-r--r--libc-test/build.rs8
1 files changed, 7 insertions, 1 deletions
diff --git a/libc-test/build.rs b/libc-test/build.rs
index 6edbd0f2ff..8dffc6819b 100644
--- a/libc-test/build.rs
+++ b/libc-test/build.rs
@@ -1455,6 +1455,11 @@ fn test_freebsd(target: &str) {
cfg.cfg("freebsd12", None);
}
+ if let Some(13) = freebsd_ver {
+ // If the host is FreeBSD 12, run FreeBSD 12 tests
+ cfg.cfg("freebsd13", None);
+ }
+
// Required for `getline`:
cfg.define("_WITH_GETLINE", None);
// Required for making freebsd11_stat available in the headers
@@ -1581,7 +1586,7 @@ fn test_freebsd(target: &str) {
| "IP_RECVORIGDSTADDR"
| "IPV6_ORIGDSTADDR"
| "IPV6_RECVORIGDSTADDR"
- if Some(12) != freebsd_ver =>
+ if Some(11) == freebsd_ver =>
{
true
}
@@ -2468,6 +2473,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,
}
}