$OpenBSD: patch-modcargo-crates_sys-info-0_9_0_lib_rs,v 1.1 2021/09/15 08:27:45 tb Exp $

Fix build on ILP32 architectures.
https://github.com/FillZpp/sys-info-rs/pull/101

Index: modcargo-crates/sys-info-0.9.0/lib.rs
--- modcargo-crates/sys-info-0.9.0/lib.rs.orig
+++ modcargo-crates/sys-info-0.9.0/lib.rs
@@ -539,7 +539,7 @@ pub fn cpu_num() -> Result<u32, Error> {
     #[cfg(any(target_os = "solaris", target_os = "illumos", target_os = "freebsd", target_os = "openbsd", target_os = "netbsd"))]
     {
         let ret = unsafe { libc::sysconf(libc::_SC_NPROCESSORS_ONLN) };
-        if ret < 1 || ret > std::u32::MAX as i64 {
+        if ret < 1 || ret as i64 > std::u32::MAX as i64 {
             Err(Error::IO(io::Error::last_os_error()))
         } else {
             Ok(ret as u32)
