From d3cf4f575644850688e40bbce5c093a97bc30bff Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Mon, 3 Feb 2014 21:23:54 +0100 Subject: [PATCH] fix compilation on Solaris: ioctl requires more headers --- ac/initialization.m4 | 2 +- src/common/terminal.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/ac/initialization.m4 b/ac/initialization.m4 index f7258f9a2..189c495b1 100644 --- a/ac/initialization.m4 +++ b/ac/initialization.m4 @@ -17,5 +17,5 @@ PKG_PROG_PKG_CONFIG dnl Check for headers AC_HEADER_STDC() -AC_CHECK_HEADERS([inttypes.h stdint.h sys/types.h sys/syscall.h]) +AC_CHECK_HEADERS([inttypes.h stdint.h sys/types.h sys/syscall.h stropts.h]) AC_CHECK_FUNCS([vsscanf syscall],,) diff --git a/src/common/terminal.cpp b/src/common/terminal.cpp index 6c616f806..b3186298c 100644 --- a/src/common/terminal.cpp +++ b/src/common/terminal.cpp @@ -18,6 +18,12 @@ # if defined(HAVE_SYS_IOCTL_H) || defined(GWINSZ_IN_SYS_IOCTL) # include # endif // HAVE_SYS_IOCTL_H || GWINSZ_IN_SYS_IOCTL +# if defined(HAVE_UNISTD_H) +# include +# endif // HAVE_UNISTD_H +# if defined(HAVE_STROPTS_H) +# include +# endif // HAVE_STROPTS_H #endif // HAVE_TIOCGWINSZ #include "common/terminal.h" @@ -37,4 +43,3 @@ get_terminal_columns() { return DEFAULT_TERMINAL_COLUMNS; #endif // HAVE_TIOCGWINSZ } -