diff options
author | Michael Heimpold <mhei@heimpold.de> | 2022-01-11 07:56:27 +0100 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2022-01-11 16:19:11 -0800 |
commit | d8d91931d079adb727aea85e67197419d39ffb91 (patch) | |
tree | 7df9b4b5b22559c996d641c5e824bbf244b96abb /libs | |
parent | 8ab044712abb7e1a319099a419b1265ea04fb53c (diff) |
libmodbus: update to 3.1.7
Signed-off-by: Michael Heimpold <mhei@heimpold.de>
Diffstat (limited to 'libs')
-rw-r--r-- | libs/libmodbus/Makefile | 4 | ||||
-rw-r--r-- | libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch | 30 |
2 files changed, 2 insertions, 32 deletions
diff --git a/libs/libmodbus/Makefile b/libs/libmodbus/Makefile index 4ae5bb53a..53f2b734d 100644 --- a/libs/libmodbus/Makefile +++ b/libs/libmodbus/Makefile @@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk PKG_NAME:=libmodbus -PKG_VERSION:=3.1.6 +PKG_VERSION:=3.1.7 PKG_RELEASE:=1 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://libmodbus.org/releases -PKG_HASH:=d7d9fa94a16edb094e5fdf5d87ae17a0dc3f3e3d687fead81835d9572cf87c16 +PKG_HASH:=7dfe958431d0570b271e1a5b329b76a658e89c614cf119eb5aadb725c87f8fbd PKG_MAINTAINER:=Michael Heimpold <mhei@heimpold.de> diff --git a/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch b/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch deleted file mode 100644 index 823335dbd..000000000 --- a/libs/libmodbus/patches/0001-Fixed-MODBUS_GET_-macros-in-case-of-negative-values.patch +++ /dev/null @@ -1,30 +0,0 @@ -From f1eb4bc7ccb09cd8d19ab641ee37637f8c34d16d Mon Sep 17 00:00:00 2001 -From: i-ky <gl.ivanovsky@gmail.com> -Date: Tue, 10 Jul 2018 15:58:45 +0300 -Subject: [PATCH] Fixed MODBUS_GET_* macros in case of negative values - -In case resulting value should be negative it is incorrect to use '+' operator to construct it from pieces, because highest bytes will result in negative number after bitwise shift while others will stay positive. Replacing addition with '|' should solve the issue. ---- - src/modbus.h | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - ---- a/src/modbus.h -+++ b/src/modbus.h -@@ -245,12 +245,12 @@ MODBUS_API int modbus_reply_exception(mo - #define MODBUS_GET_HIGH_BYTE(data) (((data) >> 8) & 0xFF) - #define MODBUS_GET_LOW_BYTE(data) ((data) & 0xFF) - #define MODBUS_GET_INT64_FROM_INT16(tab_int16, index) \ -- (((int64_t)tab_int16[(index) ] << 48) + \ -- ((int64_t)tab_int16[(index) + 1] << 32) + \ -- ((int64_t)tab_int16[(index) + 2] << 16) + \ -+ (((int64_t)tab_int16[(index) ] << 48) | \ -+ ((int64_t)tab_int16[(index) + 1] << 32) | \ -+ ((int64_t)tab_int16[(index) + 2] << 16) | \ - (int64_t)tab_int16[(index) + 3]) --#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) + tab_int16[(index) + 1]) --#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) + tab_int8[(index) + 1]) -+#define MODBUS_GET_INT32_FROM_INT16(tab_int16, index) ((tab_int16[(index)] << 16) | tab_int16[(index) + 1]) -+#define MODBUS_GET_INT16_FROM_INT8(tab_int8, index) ((tab_int8[(index)] << 8) | tab_int8[(index) + 1]) - #define MODBUS_SET_INT16_TO_INT8(tab_int8, index, value) \ - do { \ - tab_int8[(index)] = (value) >> 8; \ |