From 1a6bb2a47c308b7f22174b422ee5da91c2d16502 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Tue, 19 Jul 2016 14:28:07 -0600 Subject: [PATCH] apps/examples/pty_test: If CONFIG_SERIAL_TERMIOS is not selected, then don't call tcgetattr or tcsetattr. --- examples/pty_test/pty_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/pty_test/pty_test.c b/examples/pty_test/pty_test.c index 692482f71..9469f78d0 100644 --- a/examples/pty_test/pty_test.c +++ b/examples/pty_test/pty_test.c @@ -324,6 +324,7 @@ int pty_test_main(int argc, char *argv[]) goto error_serial; } +#ifdef CONFIG_SERIAL_TERMIOS /* Enable \n -> \r\n conversion during write */ ret = tcgetattr(termpair.fd_uart, &tio); @@ -340,6 +341,7 @@ int pty_test_main(int argc, char *argv[]) fprintf(stderr, "ERROR: tcsetattr() failed: %d\n", errno); goto error_serial; } +#endif printf("Starting a new NSH Session using %s\n", buffer);