From e0f90179828160e4a55e6536e4b62dd9c721fcb1 Mon Sep 17 00:00:00 2001 From: Neel Chotai Date: Tue, 6 Oct 2020 19:10:36 +0100 Subject: [PATCH] fix compilation on ppc --- serial_port/serial_port.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/serial_port/serial_port.h b/serial_port/serial_port.h index 73fb9311..218d340a 100644 --- a/serial_port/serial_port.h +++ b/serial_port/serial_port.h @@ -26,17 +26,26 @@ #include #include -//winsize, termio, and termios structs are redefined in -//asm/termios.h, to prevent compiler errors from multply +//these types are redefined in asm/termios.h +//to prevent compiler errors from multply //defining them, use a #define to rename them - //essentially to undef them before they are redefined #define winsize undefine_winsize #define termio undefine_termio #define termios undefine_termios +#define sgttyb undefine_sgttyb +#define tchars undefine_tchars +#define ltchars undefine_ltchars #include -#include +#include +//ppc has c_ispeed/c_ospeed in termios and termios2 doesn't exist +#if defined(__powerpc__) +#define termios2 termios +#define TCGETS2 TCGETS +#define TCSETS2 TCSETS +#endif #endif /* __linux__ */