Comment 2 for bug 2061966

Revision history for this message
Andreas Hasenack (ahasenack) wrote :

The configure check is failing due to a missing include:
conftest.c: In function 'main':
conftest.c:177:20: error: implicit declaration of function 'exit' [-Werror=implicit-function-declaration]
  177 | struct timeval tv; exit(gettimeofday(&tv, NULL));
      | ^~~~
conftest.c:174:1: note: include '<stdlib.h>' or provide a declaration of 'exit'
  173 | #include <unistd.h>
  174 | int
conftest.c:177:20: warning: incompatible implicit declaration of built-in function 'exit' [-Wbuiltin-declaration-mismatch]
  177 | struct timeval tv; exit(gettimeofday(&tv, NULL));
      | ^~~~
conftest.c:177:20: note: include '<stdlib.h>' or provide a declaration of 'exit'
cc1: some warnings being treated as errors

Since the failure is due to that missing include, instead of the gettimeofday() function, the check reaches the incorrect answer to the question "checking if gettimeofday takes tz argument ".