From 2616ec46f5b69e3452788394ba6d0e21232463cc Mon Sep 17 00:00:00 2001 From: Dmitry Lukianov Date: Sat, 5 Aug 2017 15:59:40 +0700 Subject: fixed macos build --- compat/nan.cpp | 5 +++++ compat/timer.cpp | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'compat') diff --git a/compat/nan.cpp b/compat/nan.cpp index 9c7bf147..2659ad07 100644 --- a/compat/nan.cpp +++ b/compat/nan.cpp @@ -18,6 +18,11 @@ int __cdecl my_fpclassify(double)__asm__("___fpclassify"); #define my_isinf(x) (my_fpclassify(x) == FP_INFINITE) +extern "C" OTR_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double x) +#elif defined __APPLE__ +# include +# define my_isnan(x) isnan(x) +# define my_isinf(x) isinf(x) extern "C" OTR_COMPAT_EXPORT bool __attribute__ ((noinline)) nanp(double x) #else int my_isnan(double)__asm__("isnan"); diff --git a/compat/timer.cpp b/compat/timer.cpp index ca22fa10..ff08c3d5 100644 --- a/compat/timer.cpp +++ b/compat/timer.cpp @@ -109,7 +109,7 @@ mach_timebase_info_data_t Timer::otr_get_mach_frequency() return timebase_info; } -double Timer::otr_clock_gettime(timespec* ts) +void Timer::otr_clock_gettime(timespec* ts) { static const mach_timebase_info_data_t timebase_info = otr_get_mach_frequency(); uint64_t state, nsec; -- cgit v1.2.3