Files
haikuports/dev-util/ninja/patches/ninja-1.10.2.patchset
2021-01-28 12:37:20 +01:00

59 lines
1.5 KiB
Plaintext

From 5563d3429087517d2e47d672bdb5c50d005946dc Mon Sep 17 00:00:00 2001
From: Augustin Cavalier <waddlesplash@gmail.com>
Date: Sat, 16 Sep 2017 12:25:48 +0200
Subject: Add minimal Haiku support; based on Adrien's patch.
diff --git a/src/util.cc b/src/util.cc
index 4df2bb2..0f9ef18 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -496,7 +496,7 @@ int GetProcessorCount() {
#endif
}
-#if defined(_WIN32) || defined(__CYGWIN__)
+#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__)
static double CalculateProcessorLoad(uint64_t idle_ticks, uint64_t total_ticks)
{
static uint64_t previous_idle_ticks = 0;
--
2.24.0
From a39e384e883055f1e8157ca7abfe993e8c06d7e2 Mon Sep 17 00:00:00 2001
From: Jerome Duval <jerome.duval@gmail.com>
Date: Sat, 16 Sep 2017 12:48:42 +0200
Subject: GetLoadAvg to be implemented for Haiku
diff --git a/src/util.cc b/src/util.cc
index 0f9ef18..0309516 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -496,7 +496,7 @@ int GetProcessorCount() {
#endif
}
-#if defined(_WIN32) || defined(__CYGWIN__) || defined(__HAIKU__)
+#if defined(_WIN32) || defined(__CYGWIN__)
static double CalculateProcessorLoad(uint64_t idle_ticks, uint64_t total_ticks)
{
static uint64_t previous_idle_ticks = 0;
@@ -583,6 +583,10 @@ double GetLoadAverage() {
return -0.0f;
return 1.0 / (1 << SI_LOAD_SHIFT) * si.loads[0];
}
+#elif defined(__HAIKU__)
+double GetLoadAverage() {
+ return -0.0f;
+}
#else
double GetLoadAverage() {
double loadavg[3] = { 0.0f, 0.0f, 0.0f };
--
2.24.0