git: f141757d5256 - main - net/savvycan: fix build on big-endian architectures

From: Piotr Kubaj <pkubaj_at_FreeBSD.org>
Date: Sun, 16 Jul 2023 12:07:08 UTC
The branch main has been updated by pkubaj:

URL: https://cgit.FreeBSD.org/ports/commit/?id=f141757d525640a23c7b92128272bc3d922eca47

commit f141757d525640a23c7b92128272bc3d922eca47
Author:     Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2023-07-16 12:06:12 +0000
Commit:     Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2023-07-16 12:07:06 +0000

    net/savvycan: fix build on big-endian architectures
    
    ld: error: undefined symbol: unsigned long qbswap<unsigned long>(unsigned long)
    >>> referenced by mqtt_bus.cpp
    >>>               mqtt_bus.o:(MQTT_BUS::clientMessageReceived(QMQTT::Message const&))
    
    qendian.h has a qbswap for unsigned long long, but not for unsigned long.
---
 net/savvycan/files/patch-connections_mqtt__bus.cpp | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/net/savvycan/files/patch-connections_mqtt__bus.cpp b/net/savvycan/files/patch-connections_mqtt__bus.cpp
new file mode 100644
index 000000000000..073960c36afd
--- /dev/null
+++ b/net/savvycan/files/patch-connections_mqtt__bus.cpp
@@ -0,0 +1,11 @@
+--- connections/mqtt_bus.cpp.orig	2023-07-16 12:01:54 UTC
++++ connections/mqtt_bus.cpp
+@@ -291,7 +291,7 @@ void MQTT_BUS::clientMessageReceived(const QMQTT::Mess
+         uint32_t frameID = message.topic().split("/")[1].toInt();
+ 
+         QByteArray timeStampBytes = message.payload().left(8);
+-        uint64_t timeStamp = qFromLittleEndian<uint64_t>(timeStampBytes.data());
++        quint64 timeStamp = qFromLittleEndian<quint64>(timeStampBytes.data());
+ 
+         int flags = message.payload()[8];
+         frame_p->setPayload(message.payload().right(message.payload().count() - 9));