Fossil SCM
Fix build with default Makefile for platforms which don't have getloadavg() function (e.g. Haiku/Cygwin). Patch provided by Joseph Prostko.
Commit
7023de95044817c60504f093acb62c9a4fffa33b
Parent
d77b7ed1a0a8342…
1 file changed
+5
M
auto.def
+5
| --- auto.def | ||
| +++ auto.def | ||
| @@ -248,10 +248,15 @@ | ||
| 248 | 248 | if {[string match *mingw* [get-define host]]} { |
| 249 | 249 | define-append LIBS -lwsock32 |
| 250 | 250 | } |
| 251 | 251 | } |
| 252 | 252 | cc-check-function-in-lib iconv iconv |
| 253 | + | |
| 254 | +# Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE | |
| 255 | +if {![cc-check-functions getloadavg]} { | |
| 256 | + define FOSSIL_OMIT_LOAD_AVERAGE 1 | |
| 257 | +} | |
| 253 | 258 | |
| 254 | 259 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 255 | 260 | if {![cc-check-functions getpassphrase]} { |
| 256 | 261 | # Haiku needs this |
| 257 | 262 | cc-check-function-in-lib getpass bsd |
| 258 | 263 |
| --- auto.def | |
| +++ auto.def | |
| @@ -248,10 +248,15 @@ | |
| 248 | if {[string match *mingw* [get-define host]]} { |
| 249 | define-append LIBS -lwsock32 |
| 250 | } |
| 251 | } |
| 252 | cc-check-function-in-lib iconv iconv |
| 253 | |
| 254 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 255 | if {![cc-check-functions getpassphrase]} { |
| 256 | # Haiku needs this |
| 257 | cc-check-function-in-lib getpass bsd |
| 258 |
| --- auto.def | |
| +++ auto.def | |
| @@ -248,10 +248,15 @@ | |
| 248 | if {[string match *mingw* [get-define host]]} { |
| 249 | define-append LIBS -lwsock32 |
| 250 | } |
| 251 | } |
| 252 | cc-check-function-in-lib iconv iconv |
| 253 | |
| 254 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 255 | if {![cc-check-functions getloadavg]} { |
| 256 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 257 | } |
| 258 | |
| 259 | # Check for getpassphrase() for Solaris 10 where getpass() truncates to 10 chars |
| 260 | if {![cc-check-functions getpassphrase]} { |
| 261 | # Haiku needs this |
| 262 | cc-check-function-in-lib getpass bsd |
| 263 |