소스 검색

Fix test of TIOCSRS485 define

Stéphane Raimbault 14 년 전
부모
커밋
ccdf684bea
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  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) {