summaryrefslogtreecommitdiff
path: root/system/gcc/201-ada.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/gcc/201-ada.patch')
-rw-r--r--system/gcc/201-ada.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/system/gcc/201-ada.patch b/system/gcc/201-ada.patch
index 00a6422d7..d16bbbbaa 100644
--- a/system/gcc/201-ada.patch
+++ b/system/gcc/201-ada.patch
@@ -438,3 +438,34 @@ index 98b3901cb16f..98db6a14c2d5 100644
/* Don't use macros versions of this functions on VxWorks since they cause
imcompatible changes in some VxWorks versions */
#ifdef __vxworks
+--- a/gcc/ada/terminals.c 2019-01-08 10:54:04.000000000 +0100
++++ b/gcc/ada/terminals.c 2019-05-15 13:14:09.935742526 +0200
+@@ -1136,7 +1136,7 @@
+ /* POSIX does not specify how to open the master side of a terminal.Several
+ methods are available (system specific):
+ 1- using a cloning device (USE_CLONE_DEVICE)
+- 2- getpt (USE_GETPT)
++ 2- posix_openpt (USE_POSIX_OPENPT)
+ 3- openpty (USE_OPENPTY)
+
+ When using the cloning device method, the macro USE_CLONE_DEVICE should
+@@ -1150,7 +1150,7 @@
+ #if defined (__APPLE__) || defined (BSD)
+ #define USE_OPENPTY
+ #elif defined (__linux__)
+-#define USE_GETPT
++#define USE_POSIX_OPENPT
+ #elif defined (__sun__)
+ #define USE_CLONE_DEVICE "/dev/ptmx"
+ #elif defined (_AIX)
+@@ -1199,8 +1199,8 @@
+ int master_fd = -1;
+ char *slave_name = NULL;
+
+-#ifdef USE_GETPT
+- master_fd = getpt ();
++#if defined(USE_POSIX_OPENPT)
++ master_fd = posix_openpt(O_RDWR | O_NOCTTY);
+ #elif defined (USE_OPENPTY)
+ status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
+ #elif defined (USE_CLONE_DEVICE)