mirror of
https://gitlab.com/mbunkus/mkvtoolnix.git
synced 2024-10-22 07:21:21 +00:00
Fix ioctl detection & compilation on OpenSolaris
This commit is contained in:
parent
ed986f4545
commit
6d3db5e80f
@ -1,14 +1,6 @@
|
||||
AC_CACHE_CHECK([for ioctl & TIOCGWINSZ], [ac_cv_tiocgwinsz],[
|
||||
ac_cv_tiocgwinsz="no"
|
||||
AC_LANG_PUSH(C++)
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/ioctl.h>
|
||||
],[
|
||||
struct winsize ws;
|
||||
ioctl(0, TIOCGWINSZ, &ws);
|
||||
],[ac_cv_tiocgwinsz="yes"])
|
||||
AC_LANG_POP
|
||||
])
|
||||
if test x"$ac_cv_posix_fadvise" = "xyes" ; then
|
||||
AC_SYS_POSIX_TERMIOS
|
||||
AC_HEADER_TIOCGWINSZ
|
||||
|
||||
if test x"ac_cv_sys_posix_termios" = "xyes" ; then
|
||||
AC_DEFINE([HAVE_TIOCGWINSZ], 1, [define if ioctl & TIOCGWINSZ are available])
|
||||
fi
|
||||
|
@ -14,7 +14,10 @@
|
||||
#include "common/os.h"
|
||||
|
||||
#if defined(HAVE_TIOCGWINSZ)
|
||||
# include <sys/ioctl.h>
|
||||
# include <termios.h>
|
||||
# if defined(GWINSZ_IN_SYS_IOCTL)
|
||||
# include <sys/ioctl.h>
|
||||
# endif // GWINSZ_IN_SYS_IOCTL
|
||||
#endif // HAVE_TIOCGWINSZ
|
||||
|
||||
#include "common/terminal.h"
|
||||
|
Loading…
Reference in New Issue
Block a user