Merge pull request #1158 from Zopolis4/master

Restrict overmatching MACH ifdef to only trigger on OSX and Mach
This commit is contained in:
Matthias Köfferlein 2022-09-21 22:16:39 +02:00 committed by GitHub
commit 775e9538af
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 3 deletions

View File

@ -28,7 +28,7 @@
#if defined(_MSC_VER) || defined(_WIN32)
# include <Windows.h>
# include <Psapi.h>
#elif defined(__MACH__)
#elif defined(__MACH__) && defined(__APPLE__)
# include <mach/clock.h>
# include <mach/mach.h>
# include <sys/times.h>
@ -54,7 +54,7 @@ const uint64_t ft_to_epoch_offset = uint64_t (11644473600) * uint64_t (10000000)
void current_utc_time (struct timespec *ts)
{
#if defined(__MACH__)
#if defined(__MACH__) && defined(__APPLE__)
clock_serv_t cclock;
mach_timespec_t mts;
@ -86,7 +86,7 @@ void current_utc_time (struct timespec *ts)
static int64_t ms_time ()
{
#if defined(__MACH__)
#if defined(__MACH__) && defined(__APPLE__)
clock_serv_t cclock;
mach_timespec_t mts;