From 936f20c37e6152354f74d0304eaa029f35c3b45d Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 Oct 2024 11:01:59 -0700 Subject: [PATCH 1/2] Fix pdf-structure test build on Solaris MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds include of if system has it, in order to fix: ../test/pdf-structure.c: In function ‘check_pdf’: ../test/pdf-structure.c:551:21: error: implicit declaration of function ‘WIFEXITED’ [-Wimplicit-function-declaration] 551 | WIFEXITED (ret) ? WEXITSTATUS (ret) : -1); | ^~~~~~~~~ ../test/pdf-structure.c:551:39: error: implicit declaration of function ‘WEXITSTATUS’ [-Wimplicit-function-declaration] 551 | WIFEXITED (ret) ? WEXITSTATUS (ret) : -1); | ^~~~~~~~~~~ Signed-off-by: Alan Coopersmith --- test/pdf-structure.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/pdf-structure.c b/test/pdf-structure.c index a9125d2b7..a12d0305f 100644 --- a/test/pdf-structure.c +++ b/test/pdf-structure.c @@ -33,6 +33,9 @@ #ifdef HAVE_UNISTD_H #include /* __unix__ */ #endif +#if HAVE_SYS_WAIT_H +#include +#endif #include #include From 78f7dbcba8c068d5383de9a8aec82d7bb3cfdda3 Mon Sep 17 00:00:00 2001 From: Alan Coopersmith Date: Sun, 13 Oct 2024 11:06:18 -0700 Subject: [PATCH 2/2] Fix cairo-perf-print build on Solaris MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds include of if system has it, in order to fix: ../perf/cairo-perf-print.c: In function ‘report_print’: ../perf/cairo-perf-print.c:62:28: error: storage size of ‘ws’ isn’t known 62 | struct winsize ws; | ^~ ../perf/cairo-perf-print.c:64:26: error: ‘TIOCGWINSZ’ undeclared (first use in this function) 64 | if(ioctl(fd, TIOCGWINSZ, &ws) == 0 ) { | ^~~~~~~~~~ Signed-off-by: Alan Coopersmith --- meson.build | 1 + perf/cairo-perf-print.c | 3 +++ 2 files changed, 4 insertions(+) diff --git a/meson.build b/meson.build index e45e441f3..162b2927c 100644 --- a/meson.build +++ b/meson.build @@ -138,6 +138,7 @@ check_headers = [ ['sys/ioctl.h'], ['intsafe.h'], ['alloca.h'], + ['termios.h'], ] check_types = [ diff --git a/perf/cairo-perf-print.c b/perf/cairo-perf-print.c index ab1440f55..e9c493fa3 100644 --- a/perf/cairo-perf-print.c +++ b/perf/cairo-perf-print.c @@ -43,6 +43,9 @@ #if USE_TERMINAL_SIZE #include #include +#if HAVE_TERMIOS_H +#include +#endif #endif static void