diff options
author | emax <emax@FreeBSD.org> | 2010-09-22 23:41:02 +0000 |
---|---|---|
committer | emax <emax@FreeBSD.org> | 2010-09-22 23:41:02 +0000 |
commit | f029ecd9aaa6b7e1270edd7e076e67a38dc96ff5 (patch) | |
tree | 5a160851760067eb2692c81c4b15cacae02dcd71 /lib/libbluetooth | |
parent | 6c8e5704a593940a624538494c7f3ef656c8ba4f (diff) | |
download | FreeBSD-src-f029ecd9aaa6b7e1270edd7e076e67a38dc96ff5.zip FreeBSD-src-f029ecd9aaa6b7e1270edd7e076e67a38dc96ff5.tar.gz |
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
Diffstat (limited to 'lib/libbluetooth')
-rw-r--r-- | lib/libbluetooth/bluetooth.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/libbluetooth/bluetooth.h b/lib/libbluetooth/bluetooth.h index a73dbe9..0435b4e 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 |