diff options
author | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-24 17:32:01 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@theqtcompany.com> | 2015-02-24 17:32:42 +0100 |
commit | e4f0b0568c334695cbc3c90f5a040edc61a8dcef (patch) | |
tree | ab2a79d8dddb4ed78de9933d218c5581e04c8b3f /src/bluetooth/bluez | |
parent | 9cf135dd2c2544a8c1f889b5de38136aa3ec1d4d (diff) | |
parent | dbf0bd93096f8ef54ebcf550ff104237742778dd (diff) |
Merge remote-tracking branch 'origin/5.4' into 5.5
Change-Id: Ie5ce761b77cc5c02647a9f7d52f427401b85d6b0
Diffstat (limited to 'src/bluetooth/bluez')
-rw-r--r-- | src/bluetooth/bluez/bluez_data_p.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/src/bluetooth/bluez/bluez_data_p.h b/src/bluetooth/bluez/bluez_data_p.h index 32cccb69..dc12dda2 100644 --- a/src/bluetooth/bluez/bluez_data_p.h +++ b/src/bluetooth/bluez/bluez_data_p.h @@ -46,6 +46,7 @@ // #include <QtCore/qglobal.h> +#include <QtCore/qendian.h> #include <sys/socket.h> #include <QtBluetooth/QBluetoothUuid> @@ -96,12 +97,12 @@ struct bt_security { #define btohl(d) (d) #define btohll(d) (d) #elif __BYTE_ORDER == __BIG_ENDIAN -#define htobs(d) bswap_16(d) -#define htobl(d) bswap_32(d) -#define htobll(d) bswap_64(d) -#define btohs(d) bswap_16(d) -#define btohl(d) bswap_32(d) -#define btohll(d) bswap_64(d) +#define htobs(d) qbswap((quint16)(d)) +#define htobl(d) qbswap((quint32)(d)) +#define htobll(d) qbswap((quint64)(d)) +#define btohs(d) qbswap((quint16)(d)) +#define btohl(d) qbswap((quint32)(d)) +#define btohll(d) qbswap((quint64)(d)) #else #error "Unknown byte order" #endif @@ -169,7 +170,7 @@ static inline quint16 bt_get_le16(const void *ptr) #elif __BYTE_ORDER == __BIG_ENDIAN static inline quint16 bt_get_le16(const void *ptr) { - return bswap_16(bt_get_unaligned((const quint16 *) ptr)); + return qbswap(bt_get_unaligned((const quint16 *) ptr)); } static inline void btoh128(const quint128 *src, quint128 *dst) |