From 80c46d400b0bc329ca3b09eb87684920ec1045ef Mon Sep 17 00:00:00 2001 From: Andrea Canciani Date: Fri, 11 Nov 2011 18:16:04 +0100 Subject: [PATCH] test: Fix any2ppm on MSVC C99 initialization is not allowed. Error macros are used even in the non-daemon version, hence errno.h should always be included. Fixes: any2ppm.c(107) : error C2065: 'EINTR' : undeclared identifier any2ppm.c(107) : error C2051: case expression not constant any2ppm.c(108) : error C2065: 'EAGAIN' : undeclared identifier any2ppm.c(108) : error C2051: case expression not constant any2ppm.c(271) : error C2059: syntax error : '.' --- test/any2ppm.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/test/any2ppm.c b/test/any2ppm.c index 40c304b73..0ae087706 100644 --- a/test/any2ppm.c +++ b/test/any2ppm.c @@ -77,6 +77,8 @@ #include #endif +#include + #if HAVE_UNISTD_H && HAVE_FCNTL_H && HAVE_SIGNAL_H && HAVE_SYS_STAT_H && HAVE_SYS_SOCKET_H && HAVE_SYS_POLL_H && HAVE_SYS_UN_H #include #include @@ -84,7 +86,6 @@ #include #include #include -#include #define SOCKET_PATH "./.any2ppm" #define TIMEOUT 60000 /* 60 seconds */ @@ -268,8 +269,13 @@ _cairo_script_render_page (const char *filename, cairo_surface_t *surface = NULL; cairo_status_t status; const cairo_script_interpreter_hooks_t hooks = { - .closure = &surface, - .surface_create = _create_image, + &surface, + _create_image, + NULL, /* surface_destroy */ + NULL, /* context_create */ + NULL, /* context_destroy */ + NULL, /* show_page */ + NULL /* copy_page */ }; csi = cairo_script_interpreter_create ();