Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions common/commonincludes.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@
#include <net/if.h>
#include <stdarg.h>
#include <math.h>

#if __has_include(<termios.h>)
#include <termios.h>
#elif __has_include(<sys/termios.h>)
#include <sys/termios.h>
#endif

Copy link
Owner

@jselbie jselbie Jan 24, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since has_include isn't standard, please wrap with macro to detect GCC/G++

#ifdef __GNUC__
#if __has_include(<termios.h>)
#include <termios.h>
#elif __has_include(<sys/termios.h>)
#include <sys/termios.h>
#endif
#else
#include <termios.h>
#endif

#include <boost/shared_ptr.hpp>
#include <boost/scoped_array.hpp>
Expand Down