diff --git a/include/criterion/asprintf-compat.h b/include/criterion/asprintf-compat.h index 2fc5c1b..35997ba 100644 --- a/include/criterion/asprintf-compat.h +++ b/include/criterion/asprintf-compat.h @@ -24,13 +24,21 @@ #ifndef CRITERION_ASPRINTF_COMPAT_H_ # define CRITERION_ASPRINTF_COMPAT_H_ +# ifdef __UNIX__ +# define _GNU_SOURCE 1 +# endif + # ifdef __cplusplus # include # else # include # endif -# include "common.h" +# ifdef __UNIX__ +# include +# else + +# include "common.h" CR_BEGIN_C_API @@ -40,4 +48,6 @@ CR_API int vasprintf(char **strp, const char *fmt, va_list ap) CR_NOTHROW; CR_END_C_API +# endif + #endif /* !CRITERION_ASPRINTF_COMPAT_H_ */ diff --git a/include/criterion/event.h b/include/criterion/event.h index 37881db..5138901 100644 --- a/include/criterion/event.h +++ b/include/criterion/event.h @@ -26,17 +26,13 @@ # ifdef __cplusplus # include -# include # else # include -# include # endif # include "common.h" CR_BEGIN_C_API -extern FILE *g_event_pipe; - CR_API void send_event(int kind, void *data, size_t size); CR_END_C_API diff --git a/src/event.h b/src/event.h index fc8ce4f..21d9b21 100644 --- a/src/event.h +++ b/src/event.h @@ -25,6 +25,9 @@ # define EVENT_H_ # include "criterion/event.h" +# include + +extern FILE *g_event_pipe; struct event { int kind; diff --git a/src/theories.c b/src/theories.c index 3bf0f5b..9e440ff 100644 --- a/src/theories.c +++ b/src/theories.c @@ -23,6 +23,7 @@ */ #include #include +#include #include #include #include