Fix cairo-perf-print build on Solaris

Adds include of <termios.h> 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 <alan.coopersmith@oracle.com>
This commit is contained in:
Alan Coopersmith 2024-10-13 11:06:18 -07:00
parent 936f20c37e
commit 78f7dbcba8
2 changed files with 4 additions and 0 deletions

View file

@ -138,6 +138,7 @@ check_headers = [
['sys/ioctl.h'], ['sys/ioctl.h'],
['intsafe.h'], ['intsafe.h'],
['alloca.h'], ['alloca.h'],
['termios.h'],
] ]
check_types = [ check_types = [

View file

@ -43,6 +43,9 @@
#if USE_TERMINAL_SIZE #if USE_TERMINAL_SIZE
#include <unistd.h> #include <unistd.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#if HAVE_TERMIOS_H
#include <termios.h>
#endif
#endif #endif
static void static void