From 1bab04e5075edba6106d57933ee10818c8f88887 Mon Sep 17 00:00:00 2001 From: Stéphane Raimbault Date: Wed, 22 May 2013 23:20:06 +0200 Subject: [PATCH] Avoid empty _modbus_rtu_ioctl_rts when no HAVE_DECL_TIOCM_RTS --- src/modbus-rtu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/modbus-rtu.c b/src/modbus-rtu.c index 690fb9c..27ef898 100644 --- a/src/modbus-rtu.c +++ b/src/modbus-rtu.c @@ -260,9 +260,9 @@ static int win32_ser_read(struct win32_ser *ws, uint8_t *p_msg, } #endif +#if HAVE_DECL_TIOCM_RTS static void _modbus_rtu_ioctl_rts(int fd, int on) { -#if HAVE_DECL_TIOCM_RTS int flags; ioctl(fd, TIOCMGET, &flags); @@ -272,8 +272,8 @@ static void _modbus_rtu_ioctl_rts(int fd, int on) flags &= ~TIOCM_RTS; } ioctl(fd, TIOCMSET, &flags); -#endif } +#endif static ssize_t _modbus_rtu_send(modbus_t *ctx, const uint8_t *req, int req_length) { -- libgit2 0.21.4