changeset 29408:f4cf798e6d8f stable

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 69087119ee84
children d6908a010a89 cb2d14b384df
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	Wed Mar 03 18:43:04 2021 +0100
+++ b/configure.ac	Wed Mar 03 15:50:41 2021 -0500
@@ -1089,6 +1089,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	Wed Mar 03 18:43:04 2021 +0100
+++ 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