From 5fd51161f01d672cca12ebd1ba9a48af4083f62d Mon Sep 17 00:00:00 2001 From: brarcher Date: Sun, 21 Jul 2013 21:04:58 +0000 Subject: [PATCH] Do a forward declaration of "struct sigevent" MinGW does not define "struct sigevent". As check never references any field inside this, doing a forward declaration does no harm, and allows MinGW to understand timer_create(). git-svn-id: svn+ssh://svn.code.sf.net/p/check/code/trunk@749 64e312b2-a51f-0410-8e61-82d0ca0eb02a --- lib/libcompat.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/libcompat.h b/lib/libcompat.h index eb98f62..b343d2b 100644 --- a/lib/libcompat.h +++ b/lib/libcompat.h @@ -132,6 +132,13 @@ struct itimerspec */ typedef int timer_t; +/* + * Do a simple forward declaration in case the struct is not defined. + * In the versions of timer_create in libcompat, sigevent is never + * used. + */ +struct sigevent; + int clock_gettime(int clk_id, struct timespec *ts); int timer_create(int clockid, struct sigevent *sevp, timer_t *timerid); int timer_settime(timer_t timerid, int flags, const struct itimerspec *new_value, struct itimerspec * old_value); -- 2.40.0