diff --git a/legacy/eina/configure.ac b/legacy/eina/configure.ac index fac5a11c6c..04c9da0fba 100644 --- a/legacy/eina/configure.ac +++ b/legacy/eina/configure.ac @@ -298,6 +298,9 @@ case "${host_os}" in *bsd*) EINA_LIBS="${EINA_LIBS} -lrt -lm" ;; + *darwin*) + EINA_LIBS="${EINA_LIBS} -lm" + ;; *) EINA_LIBS="${EINA_LIBS} -ldl -lrt -lm" ;; diff --git a/legacy/eina/src/include/eina_safety_checks.h b/legacy/eina/src/include/eina_safety_checks.h index 620eb20930..13e53b3f34 100644 --- a/legacy/eina/src/include/eina_safety_checks.h +++ b/legacy/eina/src/include/eina_safety_checks.h @@ -98,19 +98,19 @@ #else /* no safety checks */ #define EINA_SAFETY_ON_NULL_RETURN(exp) \ - do { (void)((exp) == NULL) } while (0) + do { (void)((exp) == NULL); } while (0) #define EINA_SAFETY_ON_NULL_RETURN_VAL(exp, val) \ do { if (0 && (exp) == NULL) (void)val; } while (0) #define EINA_SAFETY_ON_TRUE_RETURN(exp) \ - do { (void)(exp) } while (0) + do { (void)(exp); } while (0) #define EINA_SAFETY_ON_TRUE_RETURN_VAL(exp, val) \ do { if (0 && (exp)) (void)val; } while (0) #define EINA_SAFETY_ON_FALSE_RETURN(exp) \ - do { (void)((!exp)) } while (0) + do { (void)((!exp)); } while (0) #define EINA_SAFETY_ON_FALSE_RETURN_VAL(exp, val) \ do { if (0 && !(exp)) (void)val; } while (0) diff --git a/legacy/eina/src/lib/eina_counter.c b/legacy/eina/src/lib/eina_counter.c index 992e8185b0..3be46a55bf 100644 --- a/legacy/eina/src/lib/eina_counter.c +++ b/legacy/eina/src/lib/eina_counter.c @@ -83,8 +83,10 @@ _eina_counter_time_get(Eina_Nano_Time *tp) return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp); #elif defined(CLOCK_PROF) return clock_gettime(CLOCK_PROF, tp); -#else +#elif defined(CLOCK_REALTIME) return clock_gettime(CLOCK_REALTIME, tp); +#else + return gettimeofday(tp, NULL); #endif } #else