Skip to content

Commit

Permalink
fix ioctls.h location on ubuntu (#650)
Browse files Browse the repository at this point in the history
Signed-off-by: Andrey Parfenov <a1994ndrey@gmail.com>
  • Loading branch information
Andrey1994 committed Jul 25, 2023
1 parent f8b4271 commit c9bf789
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/utils/os_serial_ioctl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,22 @@

#endif

// to dont mess even more with if defined above handle one part separately
#if defined(__linux__) && !defined(__ANDROID__) && defined(NO_IOCTL_HEADERS)
#if defined __has_include
#if __has_include(<sys/ioctl.h>) && __has_include(</usr/include/asm-generic/ioctls.h>) && __has_include(</usr/include/asm-generic/termbits.h>)
#include <sys/ioctl.h>

#include </usr/include/asm-generic/ioctls.h>
#include </usr/include/asm-generic/termbits.h>
#undef NO_IOCTL_HEADERS
#else
#define NO_IOCTL_HEADERS
#endif
#else
#define NO_IOCTL_HEADERS
#endif
#endif

#if defined(_WIN32)
int OSSerial::set_custom_baudrate (int baudrate)
Expand Down

0 comments on commit c9bf789

Please sign in to comment.