Commit 1bab04e5075edba6106d57933ee10818c8f88887
1 parent
b657698d
Avoid empty _modbus_rtu_ioctl_rts when no HAVE_DECL_TIOCM_RTS
Showing
1 changed file
with
2 additions
and
2 deletions
src/modbus-rtu.c
| ... | ... | @@ -260,9 +260,9 @@ static int win32_ser_read(struct win32_ser *ws, uint8_t *p_msg, |
| 260 | 260 | } |
| 261 | 261 | #endif |
| 262 | 262 | |
| 263 | +#if HAVE_DECL_TIOCM_RTS | |
| 263 | 264 | static void _modbus_rtu_ioctl_rts(int fd, int on) |
| 264 | 265 | { |
| 265 | -#if HAVE_DECL_TIOCM_RTS | |
| 266 | 266 | int flags; |
| 267 | 267 | |
| 268 | 268 | ioctl(fd, TIOCMGET, &flags); |
| ... | ... | @@ -272,8 +272,8 @@ static void _modbus_rtu_ioctl_rts(int fd, int on) |
| 272 | 272 | flags &= ~TIOCM_RTS; |
| 273 | 273 | } |
| 274 | 274 | ioctl(fd, TIOCMSET, &flags); |
| 275 | -#endif | |
| 276 | 275 | } |
| 276 | +#endif | |
| 277 | 277 | |
| 278 | 278 | static ssize_t _modbus_rtu_send(modbus_t *ctx, const uint8_t *req, int req_length) |
| 279 | 279 | { | ... | ... |