pmaports/main/gcc4/ada-fixes.patch
Daniele Debernardi 7b3702e2dd Add gcc4 and gcc4-armhf packages (!216)
Successfully tested both the gcc4 compiler on x86_64 with a simple
program (fbdebug) and the gcc4-armhf cross-compiler to build a very old
u-boot port for Galaxy Nexus (a MR will follow soon) which failed to
boot with either newer version (6 and 8).

[skip ci]: already went through
2019-02-12 21:03:12 +00:00

44 lines
1.1 KiB
Diff

--- gcc-4.8.1/gcc/ada/terminals.c.orig
+++ gcc-4.8.1/gcc/ada/terminals.c
@@ -984,13 +984,6 @@
#include <stdio.h>
#include <stdlib.h>
-/* On some system termio is either absent or including it will disable termios
- (HP-UX) */
-#if ! defined (__hpux__) && ! defined (FREEBSD) && \
- ! defined (__APPLE__) && ! defined(__rtems__)
-# include <termio.h>
-#endif
-
#include <sys/ioctl.h>
#include <termios.h>
#include <fcntl.h>
@@ -1078,7 +1078,7 @@
char *slave_name = NULL;
#ifdef USE_GETPT
- master_fd = getpt ();
+ master_fd = posix_openpt (O_RDWR);
#elif defined (USE_OPENPTY)
status = openpty (&master_fd, &slave_fd, NULL, NULL, NULL);
#elif defined (USE_CLONE_DEVICE)
@@ -1179,7 +1170,7 @@
int status;
/* ensure that s is filled with 0 */
- bzero (&s, sizeof (&s));
+ bzero (&s, sizeof (s));
/* Get the current terminal settings */
status = tcgetattr (fd, &s);
--- gcc-4.8.1/gcc/ada/cal.c.orig
+++ gcc-4.8.1/gcc/ada/cal.c
@@ -65,6 +65,7 @@
#include <time.h>
#else
#include <sys/time.h>
+#include <time.h>
#endif
#ifdef __MINGW32__