Skip to content
Snippets Groups Projects
Commit bb0d55c8 authored by Samuel Thibault's avatar Samuel Thibault
Browse files

Fix build on mach-based OS which are not OS X

parent 066fecd1
No related branches found
No related tags found
No related merge requests found
......@@ -3,10 +3,10 @@
#ifndef _WIN32
#include <sys/time.h>
#ifdef __MACH__
#if defined(__MACH__) && defined(__APPLE__)
#include <mach/clock.h>
#include <mach/mach.h>
#endif // __MACH__
#endif // __MACH__ && __APPLE__
#endif // ifndef _WIN32
namespace diy
......@@ -16,7 +16,7 @@ typedef unsigned long time_type;
inline time_type get_time()
{
#ifdef __MACH__ // OS X does not have clock_gettime, use clock_get_time
#if defined(__MACH__) && defined(__APPLE__) // OS X does not have clock_gettime, use clock_get_time
clock_serv_t cclock;
mach_timespec_t ts;
host_get_clock_service(mach_host_self(), CALENDAR_CLOCK, &cclock);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment