netstar pushed a commit to branch master.

http://git.enlightenment.org/apps/evisum.git/commit/?id=5f763375533dde181f1b60788ce07047a41a8a90

commit 5f763375533dde181f1b60788ce07047a41a8a90
Author: Alastair Poole <nets...@gmail.com>
Date:   Sun Nov 17 17:52:25 2019 +0000

    system: HW_NCPUONLINE is OpenBSD-specific.
    
    Seems this was added to mitigate spectre and does not exist
    for FreeBSD. No other means of testing other platforms so
    enable this only with OpenBSD for now.
---
 src/system.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/src/system.c b/src/system.c
index 42ff2d3..d5a330a 100644
--- a/src/system.c
+++ b/src/system.c
@@ -209,9 +209,7 @@ cpu_count(void)
 int
 system_cpu_online_count_get(void)
 {
-#if defined(__linux__)
-   return cpu_count();
-#endif
+#if defined(__OpenBSD__)
    static int cores = 0;
 
    if (cores != 0) return cores;
@@ -224,6 +222,9 @@ system_cpu_online_count_get(void)
      return cpu_count();
 
    return cores;
+#else
+   return cpu_count();
+#endif
 }
 
 static void

-- 


Reply via email to