Skip to content

Commit

Permalink
Fix FreeBSD 12
Browse files Browse the repository at this point in the history
FreeBSD 12 changed the type of freelocale to the type defined by
POSIX. Check the FreeBSD version when building for FreeBSD.
  • Loading branch information
dankm authored and vitaut committed May 9, 2018
1 parent a4e4f74 commit edbbf7c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion test/posix-mock-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,7 @@ LocaleType newlocale(int category_mask, const char *locale, LocaleType 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;
#else
typedef void FreeLocaleResult;
Expand Down
1 change: 1 addition & 0 deletions test/posix-mock.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
#ifdef _WIN32
# include <windows.h>
#else
# include <sys/param.h> // for FreeBSD version
# include <sys/types.h> // for ssize_t
#endif

Expand Down

0 comments on commit edbbf7c

Please sign in to comment.