Skip to content

Commit

Permalink
Fixed some build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
gansm committed Jun 6, 2023
1 parent d4d4ff3 commit ba1d728
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions examples/eventloop.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ auto main() -> int
, [] (Monitor* monitor, short)
{
uint8_t Char{0};
(void)read( monitor->getFd(), &Char, 1);
std::cout << "typed in: '" << Char << "'"
<< std::endl;
const ssize_t bytes = ::read( monitor->getFd(), &Char, 1);

if ( bytes > 0 )
std::cout << "typed in: '" << Char << "'"
<< std::endl;
},
nullptr );

Expand Down

0 comments on commit ba1d728

Please sign in to comment.