Skip to content

Commit

Permalink
Check also for actual value of _HAVE_STRUCT_TERMIOS_C_{I,O}SPEED (#16)
Browse files Browse the repository at this point in the history
Since glibc 2.29 just checking for existance of the mentioned
defines is not sufficient for some platforms, e.g. mipsel.

For reference, see also
https://sourceware.org/git/?p=glibc.git;a=commit;h=e5a50db36eaa6e8c6427b3a971563240b633ca85

Signed-off-by: Michael Heimpold <[email protected]>
  • Loading branch information
mhei authored Feb 22, 2024
1 parent 07b616e commit 2a01329
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/connection/src/serial_connection_helper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ ::size_t read_from_device(int serial_port_fd, unsigned char* buffer, ::size_t co

bool operator==(const termios& lhs, const termios& rhs) {
return
#ifdef _HAVE_STRUCT_TERMIOS_C_ISPEED
#if defined(_HAVE_STRUCT_TERMIOS_C_ISPEED) && _HAVE_STRUCT_TERMIOS_C_ISPEED
(lhs.c_ispeed == rhs.c_ispeed) and
#endif
#ifdef _HAVE_STRUCT_TERMIOS_C_OSPEED
#if defined(_HAVE_STRUCT_TERMIOS_C_OSPEED) && _HAVE_STRUCT_TERMIOS_C_OSPEED
(lhs.c_ospeed == rhs.c_ospeed) and
#endif
(lhs.c_cflag == rhs.c_cflag) and (lhs.c_iflag == rhs.c_iflag) and (lhs.c_lflag == rhs.c_lflag) and
Expand Down

0 comments on commit 2a01329

Please sign in to comment.