From 9d1a8bb08246a11b5b8a7e35081d0664464ae820 Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 17 Jul 2017 16:02:25 +0900 Subject: [PATCH] eina debug bt sig handle - fix build on osx for clockid_t fix #ifdefs so it should in theory build on osx 10.11.x @fix --- src/lib/eina/eina_debug_bt.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/eina/eina_debug_bt.c b/src/lib/eina/eina_debug_bt.c index e8c01c1b3e..e3e56badaf 100644 --- a/src/lib/eina/eina_debug_bt.c +++ b/src/lib/eina/eina_debug_bt.c @@ -136,7 +136,9 @@ _signal_handler(int sig EINA_UNUSED, { int i, slot = 0; pthread_t self = pthread_self(); +#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_SCHED_GETCPU) && defined(__clockid_t_defined) clockid_t cid; +#endif // find which slot in the array of threads we have so we store info // in the correct slot for us @@ -162,7 +164,7 @@ found: * - CLOCK_THREAD_CPUTIME_ID should be identical to pthread_getcpuclockid(), * but it requires POSIX thingies to be defined. */ -#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_SCHED_GETCPU) +#if defined(HAVE_CLOCK_GETTIME) && defined(HAVE_SCHED_GETCPU) && defined(__clockid_t_defined) // store thread info like what cpu core we are on now (not reliable // but hey - better than nothing), the amount of cpu time total // we have consumed (it's cumulative so subtracing deltas can give