Commit ccdf684bea48a0606c3d4fd585b890f0ff906c56

Authored by Stéphane Raimbault
1 parent e02f0a43

Fix test of TIOCSRS485 define

Showing 1 changed file with 2 additions and 3 deletions
src/modbus-rtu.c
@@ -30,7 +30,7 @@ @@ -30,7 +30,7 @@
30 #include "modbus-rtu.h" 30 #include "modbus-rtu.h"
31 #include "modbus-rtu-private.h" 31 #include "modbus-rtu-private.h"
32 32
33 -#if defined(HAVE_TIOCSRS485) 33 +#if defined(HAVE_DECL_TIOCSRS485)
34 #include <sys/ioctl.h> 34 #include <sys/ioctl.h>
35 #include <linux/serial.h> 35 #include <linux/serial.h>
36 #endif 36 #endif
@@ -704,8 +704,7 @@ static int _modbus_rtu_connect(modbus_t *ctx) @@ -704,8 +704,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
704 return 0; 704 return 0;
705 } 705 }
706 706
707 -#if defined(HAVE_TIOCSRS485)  
708 -d 707 +#if defined(HAVE_DECL_TIOCSRS485)
709 int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode) 708 int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
710 { 709 {
711 if (ctx->backend->backend_type == _MODBUS_BACKEND_TYPE_RTU) { 710 if (ctx->backend->backend_type == _MODBUS_BACKEND_TYPE_RTU) {