summaryrefslogtreecommitdiff
path: root/sysutils/netbt-hcidump/patches/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/netbt-hcidump/patches/patch-ab')
-rw-r--r--sysutils/netbt-hcidump/patches/patch-ab74
1 files changed, 74 insertions, 0 deletions
diff --git a/sysutils/netbt-hcidump/patches/patch-ab b/sysutils/netbt-hcidump/patches/patch-ab
new file mode 100644
index 00000000000..27262b4853f
--- /dev/null
+++ b/sysutils/netbt-hcidump/patches/patch-ab
@@ -0,0 +1,74 @@
+$NetBSD: patch-ab,v 1.3.4.2 2014/12/27 11:59:22 plunky Exp $
+
+--- bluetooth/bluetooth.h.orig 2011-06-19 12:38:18.000000000 +0000
++++ bluetooth/bluetooth.h
+@@ -30,6 +30,7 @@
+ extern "C" {
+ #endif
+
++#if 0
+ #include <stdio.h>
+ #include <stdint.h>
+ #include <string.h>
+@@ -103,6 +104,17 @@ enum {
+ #else
+ #error "Unknown byte order"
+ #endif
++#else
++#include <bluetooth.h>
++#include <string.h>
++
++#define SOL_HCI BTPROTO_HCI
++
++#define htobs(d) htole16(d)
++#define htobl(d) htole32(d)
++#define btohs(d) le16toh(d)
++#define btohl(d) le32toh(d)
++#endif
+
+ /* Bluetooth unaligned access */
+ #define bt_get_unaligned(ptr) \
+@@ -121,6 +133,7 @@ do { \
+ __p->__v = (val); \
+ } while(0)
+
++#if 0
+ /* BD Address */
+ typedef struct {
+ uint8_t b[6];
+@@ -129,6 +142,7 @@ typedef struct {
+ #define BDADDR_ANY (&(bdaddr_t) {{0, 0, 0, 0, 0, 0}})
+ #define BDADDR_ALL (&(bdaddr_t) {{0xff, 0xff, 0xff, 0xff, 0xff, 0xff}})
+ #define BDADDR_LOCAL (&(bdaddr_t) {{0, 0, 0, 0xff, 0xff, 0xff}})
++#endif
+
+ /* Copy, swap, convert BD Address */
+ static inline int bacmp(const bdaddr_t *ba1, const bdaddr_t *ba2)
+@@ -141,9 +155,12 @@ static inline void bacpy(bdaddr_t *dst,
+ }
+
+ void baswap(bdaddr_t *dst, const bdaddr_t *src);
++#if 0
+ bdaddr_t *strtoba(const char *str);
+ char *batostr(const bdaddr_t *ba);
++#endif
+ int ba2str(const bdaddr_t *ba, char *str);
++#if 0
+ int str2ba(const char *str, bdaddr_t *ba);
+ int ba2oui(const bdaddr_t *ba, char *oui);
+ int bachk(const char *str);
+@@ -152,11 +169,14 @@ int baprintf(const char *format, ...);
+ int bafprintf(FILE *stream, const char *format, ...);
+ int basprintf(char *str, const char *format, ...);
+ int basnprintf(char *str, size_t size, const char *format, ...);
++#endif
+
+ void *bt_malloc(size_t size);
+ void bt_free(void *ptr);
+
++#if 0
+ int bt_error(uint16_t code);
++#endif
+ char *bt_compidtostr(int id);
+
+ typedef struct {