@@ -27,6 +27,8 @@ libmodbus 1.9.x
modbus.h is not installed at prefix.
- Fix #211460 reported by Todd Denniston
With TCP, automatic reconnect on error may not be desired.
+- Fix #224485 reported by Todd Denniston
+ libmodbus does not link with c++ code.
libmodbus 1.2.4 (2008-03-14)
- Fix #191039 reported by Todd Denniston
@@ -24,6 +24,10 @@
#include <termios.h>
#include <arpa/inet.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define MODBUS_TCP_DEFAULT_PORT 502
#define HEADER_LENGTH_RTU 0
@@ -303,4 +307,8 @@ void set_bits_from_bytes(uint8_t *dest, int address, int nb_bits,
To obtain a full byte, set nb_bits to 8. */
uint8_t get_byte_from_bits(const uint8_t *src, int address, int nb_bits);
+}
#endif /* _MODBUS_H_ */