43 lines
1.7 KiB
Diff
43 lines
1.7 KiB
Diff
Description: fix FTBFS for non-linux
|
|
.
|
|
Author: Alf Gaida <agaida@siduction.org>
|
|
|
|
---
|
|
Last-Update: <YYYY-MM-DD>
|
|
|
|
--- a/lib/kpty.cpp
|
|
+++ b/lib/kpty.cpp
|
|
@@ -117,24 +117,20 @@
|
|
# define _NEW_TTY_CTRL
|
|
#endif
|
|
|
|
-#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__)
|
|
+#if HAVE_TCGETATTR
|
|
+# define _tcgetattr(fd, ttmode) tcgetattr(fd, ttmode)
|
|
+#elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__)
|
|
# define _tcgetattr(fd, ttmode) ioctl(fd, TIOCGETA, (char *)ttmode)
|
|
#else
|
|
-# if defined(_HPUX_SOURCE) || defined(__Lynx__) || defined (__CYGWIN__)
|
|
-# define _tcgetattr(fd, ttmode) tcgetattr(fd, ttmode)
|
|
-# else
|
|
-# define _tcgetattr(fd, ttmode) ioctl(fd, TCGETS, (char *)ttmode)
|
|
-# endif
|
|
+# define _tcgetattr(fd, ttmode) ioctl(fd, TCGETS, (char *)ttmode)
|
|
#endif
|
|
|
|
-#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__)
|
|
+#if HAVE_TCSETATTR
|
|
+# define _tcsetattr(fd, ttmode) tcsetattr(fd, TCSANOW, ttmode)
|
|
+#elif defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__) || defined (__bsdi__) || defined(__APPLE__) || defined (__DragonFly__)
|
|
# define _tcsetattr(fd, ttmode) ioctl(fd, TIOCSETA, (char *)ttmode)
|
|
#else
|
|
-# if defined(_HPUX_SOURCE) || defined(__CYGWIN__)
|
|
-# define _tcsetattr(fd, ttmode) tcsetattr(fd, TCSANOW, ttmode)
|
|
-# else
|
|
-# define _tcsetattr(fd, ttmode) ioctl(fd, TCSETS, (char *)ttmode)
|
|
-# endif
|
|
+# define _tcsetattr(fd, ttmode) ioctl(fd, TCSETS, (char *)ttmode)
|
|
#endif
|
|
|
|
//#include <kdebug.h>
|