Hello,

I was trying to build a recent version of Fossil on Haiku, and noticed
that the build failed due to there not being getloadavg() on the
platform.

Below is a patch via `fossil diff` to detect getloadavg() which allows
Fossil to build cleanly on Haiku (and potentially other systems that
would happen not to have getloadavg() available.


Index: auto.def
==================================================================
--- auto.def
+++ auto.def
@@ -248,10 +248,15 @@
     if {[string match *mingw* [get-define host]]} {
         define-append LIBS -lwsock32
     }
 }
 cc-check-function-in-lib iconv iconv
+
+# Check for getloadavg(), and if it doesn't exist, define
FOSSIL_OMIT_LOAD_AVERAGE
+if {![cc-check-functions getloadavg]} {
+  define FOSSIL_OMIT_LOAD_AVERAGE 1
+}

 # Check for getpassphrase() for Solaris 10 where getpass() truncates
to 10 chars
 if {![cc-check-functions getpassphrase]} {
     # Haiku needs this
     cc-check-function-in-lib getpass bsd
_______________________________________________
fossil-users mailing list
fossil-users@lists.fossil-scm.org
http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

Reply via email to