https://bugs.linaro.org/show_bug.cgi?id=299

--- Comment #4 from Ola Liljedahl <[email protected]> ---
Unfortunately (but unsurprisingly) this problem persists with the new timer
implementation (patch posted but not yet merged). So we need to fix it.

/usr/include/time.h:
# ifdef __USE_POSIX199309
#if !defined __timer_t_defined && \
    ((defined _TIME_H && defined __USE_POSIX199309) || defined __need_timer_t)
# define __timer_t_defined      1

# include <bits/types.h>

/* Timer ID returned by `timer_create'.  */
typedef __timer_t timer_t;

#endif /* timer_t not defined and <time.h> or need timer_t.  */

/* Create new per-process timer using CLOCK_ID.  */
extern int timer_create (clockid_t __clock_id,
                         struct sigevent *__restrict __evp,
                         timer_t *__restrict __timerid) __THROW;
#endif


Why is __USE_POSIX199309 undefined when you compile with -std=c99?
The C language level should not affect which OS/runtime facilities I use.
I guess we can add -D__USE_POSIX199309 somewhere. At the top of odp_timer.c
before all #include?

Unfortunately there are other stdc99 problems that don't go away with this
define. E.g. "union sigval" or "sigval_t" (which the proper name). Seems we
need to include linux/signal.h to get this definition from asm/siginfo.h but
this introduces other compilation errors...

I currently have these defines but still no complete success:
#define __USE_XOPEN_EXTENDED
#define __USE_POSIX199309
#define __need_timer_t //for timer_t
#define _BSD_SOURCE //for strdup()

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
lng-odp mailing list
[email protected]
http://lists.linaro.org/mailman/listinfo/lng-odp

Reply via email to