From 3b0472c7128b4175fd0c7a4140e2ea31bf4d1dd3 Mon Sep 17 00:00:00 2001 From: ravenlock Date: Sat, 25 Oct 2008 18:17:22 +0000 Subject: [PATCH] Build on FreeBSD. Patch from Naruto, plus a tweak to remove the unneeded libdl. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/eina@37103 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- configure.ac | 3 +++ src/lib/eina_counter.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/configure.ac b/configure.ac index 39d116a..d6c5a59 100644 --- a/configure.ac +++ b/configure.ac @@ -274,6 +274,9 @@ case "${host_os}" in EINA_LIBS="${EINA_LIBS} ${EVIL_LIBS} -lm" lt_enable_auto_import="-Wl,--enable-auto-import" ;; + *bsd*) + EINA_LIBS="${EINA_LIBS} -lrt -lm" + ;; *) EINA_LIBS="${EINA_LIBS} -ldl -lrt -lm" ;; diff --git a/src/lib/eina_counter.c b/src/lib/eina_counter.c index 29a546b..fee3cbc 100644 --- a/src/lib/eina_counter.c +++ b/src/lib/eina_counter.c @@ -76,7 +76,11 @@ static int _eina_counter_init_count = 0; static inline int _eina_counter_time_get(Eina_Nano_Time *tp) { +#ifdef __FreeBSD__ + return clock_gettime(CLOCK_PROF, tp); +#else return clock_gettime(CLOCK_PROCESS_CPUTIME_ID, tp); +#endif } #else static int EINA_COUNTER_ERROR_WINDOWS = 0; -- 2.7.4