From ca09f8a1077eb9b10c860a87738d02866d46dafb Mon Sep 17 00:00:00 2001 From: Daniel Agar Date: Sun, 29 Jan 2017 18:39:44 -0500 Subject: [PATCH] uORBDevices use global read with stdin int --- src/modules/uORB/uORBDevices.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/modules/uORB/uORBDevices.cpp b/src/modules/uORB/uORBDevices.cpp index 27b14e1a344..45bb617b92c 100644 --- a/src/modules/uORB/uORBDevices.cpp +++ b/src/modules/uORB/uORBDevices.cpp @@ -1097,8 +1097,10 @@ void uORB::DeviceMaster::showTop(char **topic_filter, int num_filters) #ifdef __PX4_QURT //QuRT has no poll() int num_runs = 0; #else + const int stdin_fileno = 0; + struct pollfd fds; - fds.fd = 0; /* stdin */ + fds.fd = stdin_fileno; fds.events = POLLIN; #endif bool quit = false; @@ -1123,7 +1125,7 @@ void uORB::DeviceMaster::showTop(char **topic_filter, int num_filters) if (ret > 0) { - ret = read(0, &c, 1); + ret = ::read(stdin_fileno, &c, 1); if (ret) { quit = true;