mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2026-03-20 11:11:08 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user