summaryrefslogtreecommitdiffstats
path: root/lib/libncurses/lib_kernel.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libncurses/lib_kernel.c')
-rw-r--r--lib/libncurses/lib_kernel.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/libncurses/lib_kernel.c b/lib/libncurses/lib_kernel.c
index e373935..bd81fe1 100644
--- a/lib/libncurses/lib_kernel.c
+++ b/lib/libncurses/lib_kernel.c
@@ -211,6 +211,7 @@ int flushinp()
*
*/
+#ifndef TERMIOS
struct speed {
speed_t s;
int sp;
@@ -253,25 +254,28 @@ static struct speed speeds[] = {
,{B115200, 115200}
#endif
};
+#endif
int
baudrate()
{
+#ifndef TERMIOS
int i, ret;
+#endif
T(("baudrate() called"));
#ifdef TERMIOS
- ret = cfgetospeed(&cur_term->Nttyb);
+ return cfgetospeed(&cur_term->Nttyb);
#else
ret = cur_term->Nttyb.sg_ospeed;
-#endif
if(ret < 0 || ret > MAX_BAUD)
return ERR;
for (i = 0; i < (sizeof(speeds) / sizeof(struct speed)); i++)
if (speeds[i].s == ret)
return speeds[i].sp;
return ERR;
+#endif
}
OpenPOWER on IntegriCloud