From 2da9a9928574b679d7ba24f5a3c64da999a7c15a Mon Sep 17 00:00:00 2001 From: lizy <821610729@qq.com> Date: Tue, 27 Aug 2024 18:37:40 +0800 Subject: [PATCH] Do not use BSD interface for MIPS. #40 --- src/sigar_getline.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/sigar_getline.c b/src/sigar_getline.c index 0a8946bc8..b4d70d804 100644 --- a/src/sigar_getline.c +++ b/src/sigar_getline.c @@ -360,9 +360,12 @@ static void search_forw(int s); /* look forw for current string */ #if defined(__linux__) && defined(__alpha__) # define R__ALPHALINUX // = linux on Alpha #endif +#if defined(__linux__) && defined(__mips__) +# define R__MIPSLINUX // = linux on MIPS +#endif #if defined(TIOCGETP) && !defined(__sgi) && !defined(R__MKLINUX) && \ - !defined(R__ALPHALINUX) /* use BSD interface if possible */ + !defined(R__ALPHALINUX) &&!defined(R__MIPSLINUX) /* use BSD interface if possible */ #include static struct sgttyb new_tty, old_tty; static struct tchars tch; @@ -371,7 +374,7 @@ static struct ltchars ltch; #ifdef SIGTSTP /* need POSIX interface to handle SUSP */ #include #if defined(__sun) || defined(__sgi) || defined(R__MKLINUX) || \ - defined(R__ALPHALINUX) + defined(R__ALPHALINUX) || defined(R__MIPSLINUX) #undef TIOCGETP /* Solaris and SGI define TIOCGETP in */ #undef TIOCSETP #endif