# Bluetooth & bluez



## monty_hall (Jul 5, 2009)

bluetooth.h already has a few macros for linux bluez compatibility. How do I request the following bluez macros be added?  (this is straight out of bluez's bluetooth.h). I'm porting some Linux Bluetooth software, and find heavy use of these macros.

Monty

```
/* Byte order conversions */
#if __BYTE_ORDER == __LITTLE_ENDIAN
#define htobs(d)  (d)
#define htobl(d)  (d)
#define btohs(d)  (d)
#define btohl(d)  (d)
#elif __BYTE_ORDER == __BIG_ENDIAN
#define htobs(d)  bswap_16(d)
#define htobl(d)  bswap_32(d)
#define btohs(d)  bswap_16(d)
#define btohl(d)  bswap_32(d)
#else
#error "Unknown byte order"
#endif
```


----------



## lme@ (Jul 6, 2009)

I suggest that you send a PR with send-pr and send the patch to freebsd-bluetooth@freebsd.org mailing list.


----------



## BrockyL (Sep 1, 2013)

There are already those specific macros, you just need to find them in /usr/include/sys and add them to the include, and make sure your automake is either cross/compiling or not to the proper architecture.


----------

