blind fix for macos crap
This commit is contained in:
parent
a824112930
commit
c81bbd5e6a
2 changed files with 11 additions and 1 deletions
|
@ -274,6 +274,7 @@ endif
|
|||
config.set('TAISEI_BUILDCONF_USE_GNU_EXTENSIONS', get_option('use_gnu_ext'))
|
||||
config.set('TAISEI_BUILDCONF_HAVE_BUILTIN_POPCOUNTLL', cc.has_function('__builtin_popcountll'))
|
||||
config.set('TAISEI_BUILDCONF_HAVE_BUILTIN_POPCOUNT', cc.has_function('__builtin_popcount'))
|
||||
config.set('TAISEI_BUILDCONF_HAVE_BUILTIN_AVAILABLE', cc.has_function('__builtin_available'))
|
||||
|
||||
if enable_zip and dep_zip.found()
|
||||
if dep_zip.type_name() == 'internal'
|
||||
|
|
|
@ -14,7 +14,16 @@
|
|||
|
||||
void get_system_time(SystemTime *systime) {
|
||||
#if defined(TAISEI_BUILDCONF_HAVE_TIMESPEC)
|
||||
timespec_get(systime, TIME_UTC);
|
||||
#if defined(TAISEI_BUILDCONF_HAVE_BUILTIN_AVAILABLE)
|
||||
if(__builtin_available(macOS 10.15, *)) {
|
||||
timespec_get(systime, TIME_UTC);
|
||||
} else {
|
||||
systime->tv_sec = time(NULL);
|
||||
systime->tv_nsec = 0;
|
||||
}
|
||||
#else
|
||||
timespec_get(systime, TIME_UTC);
|
||||
#endif
|
||||
#else
|
||||
systime->tv_sec = time(NULL);
|
||||
systime->tv_nsec = 0;
|
||||
|
|
Loading…
Reference in a new issue