Linux bluetooth development
 help / color / mirror / Atom feed
* [PATCH] Fix compilation against latest BlueZ
@ 2011-03-18 19:10 Anderson Lizardo
  2011-03-21  9:09 ` Johan Hedberg
  0 siblings, 1 reply; 2+ messages in thread
From: Anderson Lizardo @ 2011-03-18 19:10 UTC (permalink / raw)
  To: linux-bluetooth; +Cc: Anderson Lizardo

BlueZ now has ntoh64()/hton64() functions in bluetooth.h, therefore the
hcidump local copy is not necessary.
---
 src/hcidump.c |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)

diff --git a/src/hcidump.c b/src/hcidump.c
index af086c7..2023130 100644
--- a/src/hcidump.c
+++ b/src/hcidump.c
@@ -50,22 +50,6 @@
 #include "parser/parser.h"
 #include "parser/sdp.h"
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-static inline uint64_t ntoh64(uint64_t n)
-{
-	uint64_t h;
-	uint64_t tmp = ntohl(n & 0x00000000ffffffff);
-	h = ntohl(n >> 32);
-	h |= tmp << 32;
-	return h;
-}
-#elif __BYTE_ORDER == __BIG_ENDIAN
-#define ntoh64(x) (x)
-#else
-#error "Unknown byte order"
-#endif
-#define hton64(x) ntoh64(x)
-
 #define SNAP_LEN 	HCI_MAX_FRAME_SIZE
 #define DEFAULT_PORT	"10839";
 
-- 
1.7.0.4


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] Fix compilation against latest BlueZ
  2011-03-18 19:10 [PATCH] Fix compilation against latest BlueZ Anderson Lizardo
@ 2011-03-21  9:09 ` Johan Hedberg
  0 siblings, 0 replies; 2+ messages in thread
From: Johan Hedberg @ 2011-03-21  9:09 UTC (permalink / raw)
  To: Anderson Lizardo; +Cc: linux-bluetooth

Hi Lizardo,

On Fri, Mar 18, 2011, Anderson Lizardo wrote:
> BlueZ now has ntoh64()/hton64() functions in bluetooth.h, therefore the
> hcidump local copy is not necessary.
> ---
>  src/hcidump.c |   16 ----------------
>  1 files changed, 0 insertions(+), 16 deletions(-)

Pushed upstream. Thanks.

Johan

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-21  9:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-18 19:10 [PATCH] Fix compilation against latest BlueZ Anderson Lizardo
2011-03-21  9:09 ` Johan Hedberg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox