gettimeofday() is an XSI extension, obsoleted in X/Open Issue 7. When _POSIX_C_SOURCE is defined FreeBSD enforces strict POSIX compliance i.e., disables extensions. While the warning can be silenced by defining _XOPEN_SOURCE it has be kept in sync with _POSIX_C_SOURCE value.