Fix compilation error on systems without RS-485 support

This commit is contained in:
Martin Lund 2022-09-11 12:51:48 +02:00
parent 137e6111f6
commit 47827f094b

View file

@ -72,6 +72,7 @@ foreach rate : test_baudrates
endforeach endforeach
# Test for RS-485 support on Linux # Test for RS-485 support on Linux
enable_rs485 = false
if host_machine.system() == 'linux' if host_machine.system() == 'linux'
if compiler.check_header('linux/serial.h') if compiler.check_header('linux/serial.h')
enable_rs485 = compiler.has_header_symbol('sys/ioctl.h', 'TIOCSRS485') enable_rs485 = compiler.has_header_symbol('sys/ioctl.h', 'TIOCSRS485')