Let test suites see strtoull() on FreeBSD if building with -std=c99

Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
Gilles Peskine
2026-02-19 01:23:56 +01:00
parent fa62af0a47
commit b17d0f3028

View File

@@ -24,9 +24,13 @@
#endif
#if defined(__FreeBSD__)
// for gettimeofday() (On FreeBSD, _POSIX_C_SOURCE isn't enough)
/* On FreeBSD as of 14.3, no value of _POSIX_C_SOURCE is enough for
* gettimeofday(), you need _XOPEN_SOURCE (any value).
* Furthermore, setting _XOPEN_SOURCE to 500 removes support for long long
* in libc, so you need at least 600 for e.g. strtoull().
*/
#if !defined(_XOPEN_SOURCE)
#define _XOPEN_SOURCE 500
#define _XOPEN_SOURCE 600
#endif
#endif