| | @@ -570,10 +570,18 @@ |
| 570 | 570 | cc-check-functions utime |
| 571 | 571 | cc-check-functions usleep |
| 572 | 572 | cc-check-functions strchrnul |
| 573 | 573 | cc-check-functions pledge |
| 574 | 574 | cc-check-functions backtrace |
| 575 | + |
| 576 | +# Termux on Android adds "getpass(char *)" to unistd.h, so check this so we |
| 577 | +# guard against including it again; use cctest as cc-check-functions and |
| 578 | +# cctest_function check for "getpass()" with no args and fail |
| 579 | +if {[cctest -link 1 -includes {unistd.h} -code "getpass(0);"]} { |
| 580 | + define FOSSIL_HAVE_GETPASS 1 |
| 581 | + msg-result "Found getpass() with unistd.h" |
| 582 | +} |
| 575 | 583 | |
| 576 | 584 | # Check for getloadavg(), and if it doesn't exist, define FOSSIL_OMIT_LOAD_AVERAGE |
| 577 | 585 | if {![cc-check-functions getloadavg]} { |
| 578 | 586 | define FOSSIL_OMIT_LOAD_AVERAGE 1 |
| 579 | 587 | msg-result "Load average support unavailable" |
| 580 | 588 | |