diff options
author | Fabrice Fontaine <fontaine.fabrice@gmail.com> | 2019-01-14 07:35:29 +0100 |
---|---|---|
committer | Thomas Petazzoni <thomas.petazzoni@bootlin.com> | 2019-01-14 22:21:06 +0100 |
commit | dde3ed4f90267b3ae5734f28da0969e11834c5ea (patch) | |
tree | 01047b4e02ef41aa216232aabad547b14f882280 /package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch | |
parent | dab729c58bdec7975db8d3b6984e9c0bf4d28ecc (diff) | |
download | buildroot-dde3ed4f90267b3ae5734f28da0969e11834c5ea.tar.gz buildroot-dde3ed4f90267b3ae5734f28da0969e11834c5ea.zip |
package/libserial: bump to version 1.0.0
- Move site to github
- Add gcc >= 5 dependency for C++14:
https://github.com/crayzeewulf/libserial/commit/cafeffaa60f23012675d908b1e13b89aad3b56b2
- Remove first patch and use --without-python instead
- Remove second patch (patch has been merged in 2015:
https://github.com/crayzeewulf/libserial/commit/47ca0621ccd2100e4ba0d7f4e2a861d14f05f63c)
- Add a new patch to fix build when size_t is an unsigned int
- Use new --disable-tests option
- Update license to BSD-3-Clause and replace COPYING by LICENSE.txt:
https://github.com/crayzeewulf/libserial/commit/3f12abc045aae34a40a6fc9a9b5ed0a1bc6b2049
- Add hash for license file
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch')
-rw-r--r-- | package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch b/package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch new file mode 100644 index 0000000000..a01da53adb --- /dev/null +++ b/package/libserial/0001-SerialPort.cpp-fix-build-when-size_t-is-an-unsigned-.patch @@ -0,0 +1,39 @@ +From 2e4cf095afdcf843e93d1bdea9dbd961558f09bd Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine <fontaine.fabrice@gmail.com> +Date: Sun, 13 Jan 2019 21:01:19 +0100 +Subject: [PATCH] SerialPort.cpp: fix build when size_t is an unsigned int + +size_t can be defined as an unsigned int instead of long unsigned int so +replace 1UL to (size_t)1 when calling max function + +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com> +[Upstream status: https://github.com/crayzeewulf/libserial/pull/126] +--- + src/SerialPort.cpp | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/SerialPort.cpp b/src/SerialPort.cpp +index e354fcb..75e762e 100644 +--- a/src/SerialPort.cpp ++++ b/src/SerialPort.cpp +@@ -2208,7 +2208,7 @@ namespace LibSerial + + // Local variables. + size_t number_of_bytes_read = 0 ; +- size_t number_of_bytes_remaining = std::max(numberOfBytes, 1UL) ; ++ size_t number_of_bytes_remaining = std::max(numberOfBytes, (size_t)1) ; + size_t maximum_number_of_bytes = dataBuffer.max_size() ; + + // Clear the data buffer and reserve enough space in the buffer to store the incoming data. +@@ -2302,7 +2302,7 @@ namespace LibSerial + + // Local variables. + size_t number_of_bytes_read = 0 ; +- size_t number_of_bytes_remaining = std::max(numberOfBytes, 1UL) ; ++ size_t number_of_bytes_remaining = std::max(numberOfBytes, (size_t)1) ; + size_t maximum_number_of_bytes = dataString.max_size() ; + + // Clear the data buffer and reserve enough space in the buffer to store the incoming data. +-- +2.14.1 + |