From ff7e67ac1cc8ac7c9219ae324e7433e53fa7720b Mon Sep 17 00:00:00 2001 From: Maksim Yevmenkin Date: Wed, 22 Sep 2010 23:41:02 +0000 Subject: [PATCH] Add the following Linux BlueZ compatibility macros: htobs(), htobl(), btohs() and btohl() PR: kern/136386 Submitted by: Monty Hall < kungfu_disciple at sbcglobal dot net > MFC after: 1 week --- lib/libbluetooth/bluetooth.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libbluetooth/bluetooth.h b/lib/libbluetooth/bluetooth.h index a73dbe915bc1..0435b4e2f232 100644 --- a/lib/libbluetooth/bluetooth.h +++ b/lib/libbluetooth/bluetooth.h @@ -59,6 +59,10 @@ __BEGIN_DECLS #define bacpy(dst, src) memcpy((dst), (src), sizeof(bdaddr_t)) #define ba2str(ba, str) bt_ntoa((ba), (str)) #define str2ba(str, ba) (bt_aton((str), (ba)) == 1? 0 : -1) +#define htobs(d) htole16(d) +#define htobl(d) htole32(d) +#define btohs(d) le16toh(d) +#define btohl(d) le32toh(d) /* * Interface to the outside world