1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 07:27:45 +00:00

Ports: Add ninja

- 1.8.2 for now, newer versions need high-res timestamp file APIs
  which serenity doesn't have yet
- pselect() instead of ppoll() for now, same reason (depends on #2609)
- no good default for -j yet (see nproc.patch)
- `-l` probably doesn't work yet (see loadavg.patch), but I've never
  used that anyways
- some minor include patches that I've also sent upstream

Other than that, this seems to work reasonably well. It currently
produces some spam on stdout from probably the shell.
This commit is contained in:
Nico Weber 2020-06-21 18:41:01 -04:00 committed by Andreas Kling
parent d23e655c83
commit 7f73f0300c
6 changed files with 98 additions and 0 deletions

View file

@ -0,0 +1,19 @@
diff --git a/src/util.cc b/src/util.cc
index ae94d34..72cf501 100644
--- a/src/util.cc
+++ b/src/util.cc
@@ -566,11 +566,14 @@ double GetLoadAverage() {
#else
double GetLoadAverage() {
double loadavg[3] = { 0.0f, 0.0f, 0.0f };
+ /*
+ * FIXME: serenity way of getting loadavg
if (getloadavg(loadavg, 3) < 0) {
// Maybe we should return an error here or the availability of
// getloadavg(3) should be checked when ninja is configured.
return -0.0f;
}
+ */
return loadavg[0];
}
#endif // _WIN32