freebsd-ports/sysutils/rsfetch/files/patch-src_util.rs
Mikael Urankar 865ff6c103 sysutils/rsfetch: fix memory reporting and add DragonFlyBSD support
Import upstream fix [1] to fix fix memory reporting and add DragonFlyBSD support.

[1] 2bd3ef9eaf

PR:		244861
Approved by:	Lewis Cook (maintainer), manu (mentor, implicit)
2020-03-18 08:34:36 +00:00

28 lines
824 B
Rust

--- src/util.rs.orig 2020-03-16 13:14:06 UTC
+++ src/util.rs
@@ -8,6 +8,7 @@ pub enum OS {
FreeBSD,
OpenBSD,
NetBSD,
+ DragonflyBSD,
Other
}
@@ -23,11 +24,12 @@ impl OSInfo {
.output()?.stdout.iter()
.for_each(|b| uname.push(*b as char));
let os = match uname.replace("\n", "").trim().as_ref() {
- "Linux" => OS::Linux,
- "FreeBSD" => OS::FreeBSD,
- "NetBSD" => OS::NetBSD,
- "OpenBSD" => OS::OpenBSD,
- &_ => OS::Other,
+ "Linux" => OS::Linux,
+ "FreeBSD" => OS::FreeBSD,
+ "NetBSD" => OS::NetBSD,
+ "OpenBSD" => OS::OpenBSD,
+ "DragonFly" => OS::DragonflyBSD,
+ &_ => OS::Other,
};
Ok(os)