From 2c4c2317592daac97aac6669fd7b68e07a3dbec6 Mon Sep 17 00:00:00 2001 From: Vicente Olivert Riera Date: Wed, 7 Oct 2015 17:41:46 +0100 Subject: [PATCH] term.c: define CMSPAR when a specific termios.h doesn't do it CMSPAR is defined by bits/termios.h, and glibc has two flavours of it: a generic one and an architecture-specific one. glibc will install the architecture-specific one if it exists, otherwise it will install the generic one. Only Alpha, MIPS, PPC and Sparc have their own bits/termios.h. The generic bits/termios.h, as well as the Alpha, PPC and Sparc flavours do define CMSPAR. However, the MIPS flavour does not define it. Define CMSPAR to the value from the generic value, which is also the value known to the Linux kernel for MIPS. Patch inspired by: http://git.buildroot.net/buildroot/commit/?id=78cd32631e959e04b1a2f18be7b0757e21482438 Signed-off-by: Vicente Olivert Riera --- term.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/term.c b/term.c index 844d6d3..2b965f7 100644 --- a/term.c +++ b/term.c @@ -34,6 +34,14 @@ #include #include #include + +/* glibc for MIPS has its own bits/termios.h which does not define + * CMSPAR, so we use the value from the generic bits/termios.h + */ +#ifndef CMSPAR +#define CMSPAR 010000000000 +#endif + #ifdef __linux__ #include #endif