mirror of
https://github.com/fmtlib/fmt.git
synced 2024-12-25 15:21:54 +00:00
Fix FreeBSD 12
FreeBSD 12 changed the type of freelocale to the type defined by POSIX. Check the FreeBSD version when building for FreeBSD.
This commit is contained in:
parent
a4e4f74530
commit
edbbf7ce6c
@ -476,7 +476,7 @@ LocaleType newlocale(int category_mask, const char *locale, LocaleType base) {
|
|||||||
return LocaleMock::instance->newlocale(category_mask, locale, base);
|
return LocaleMock::instance->newlocale(category_mask, locale, base);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
#if defined(__APPLE__) || (defined(__FreeBSD__) && __FreeBSD_version < 1200002)
|
||||||
typedef int FreeLocaleResult;
|
typedef int FreeLocaleResult;
|
||||||
#else
|
#else
|
||||||
typedef void FreeLocaleResult;
|
typedef void FreeLocaleResult;
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#else
|
#else
|
||||||
|
# include <sys/param.h> // for FreeBSD version
|
||||||
# include <sys/types.h> // for ssize_t
|
# include <sys/types.h> // for ssize_t
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user