Browse Source

Fix test of TIOCSRS485 define

Stéphane Raimbault 14 years ago
parent
commit
ccdf684bea
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/modbus-rtu.c

+ 2 - 3
src/modbus-rtu.c

@@ -30,7 +30,7 @@
 #include "modbus-rtu.h"
 #include "modbus-rtu-private.h"
 
-#if defined(HAVE_TIOCSRS485)
+#if defined(HAVE_DECL_TIOCSRS485)
 #include <sys/ioctl.h>
 #include <linux/serial.h>
 #endif
@@ -704,8 +704,7 @@ static int _modbus_rtu_connect(modbus_t *ctx)
     return 0;
 }
 
-#if defined(HAVE_TIOCSRS485)
-d
+#if defined(HAVE_DECL_TIOCSRS485)
 int modbus_rtu_set_serial_mode(modbus_t *ctx, int mode)
 {
     if (ctx->backend->backend_type == _MODBUS_BACKEND_TYPE_RTU) {