changeset 29404:f30071845cf8

check for stropts.h (bug #60163) * configure.ac: Check for stropts.h and sys/stropts.h. * kpty.cpp: Also optionally include <stropts.h>.
author John W. Eaton <jwe@octave.org>
date Wed, 03 Mar 2021 15:50:41 -0500
parents aef9c5caedcd
children 2f09b4c03436
files configure.ac libgui/qterminal/libqterminal/unix/kpty.cpp
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/configure.ac	Mon Mar 01 20:11:59 2021 -0500
+++ b/configure.ac	Wed Mar 03 15:50:41 2021 -0500
@@ -1095,6 +1095,7 @@
 dnl Use multiple AC_CHECKs to avoid line continuations '\' in list.
 AC_CHECK_HEADERS([dlfcn.h floatingpoint.h fpu_control.h grp.h])
 AC_CHECK_HEADERS([ieeefp.h pthread.h pwd.h sys/ioctl.h])
+AC_CHECK_HEADERS([stropts.h sys/stropts.h])
 
 ## Some versions of GCC fail when using -fopenmp and including
 ## stdatomic.h, so we try to work around that.  Use the compile_ifelse
--- a/libgui/qterminal/libqterminal/unix/kpty.cpp	Mon Mar 01 20:11:59 2021 -0500
+++ b/libgui/qterminal/libqterminal/unix/kpty.cpp	Wed Mar 03 15:50:41 2021 -0500
@@ -111,7 +111,10 @@
 # include <bsdtty.h>
 #endif
 
-#ifdef HAVE_SYS_STROPTS_H
+#if defined (HAVE_STROPTS_H)
+# include <stropts.h>	        // Defines I_PUSH
+# define _NEW_TTY_CTRL
+#elif defined (HAVE_SYS_STROPTS_H)
 # include <sys/stropts.h>	// Defines I_PUSH
 # define _NEW_TTY_CTRL
 #endif