bluez: use GLib defines to check for byte order
authorTim-Philipp Müller <tim@centricular.net>
Thu, 10 Jan 2013 00:31:25 +0000 (00:31 +0000)
committerTim-Philipp Müller <tim@centricular.net>
Thu, 10 Jan 2013 00:31:25 +0000 (00:31 +0000)
sys/bluez/a2dp-codecs.h

index 3dc31cbf928c4016a9b77743b407748136c8c48a..b83687288b5063da850cc79e3c3ec2c73eb143ac 100644 (file)
  *
  */
 
+#ifndef __GST_BLUEZ_A2DP_CODECS_H_INCLUDED__
+#define __GST_BLUEZ_A2DP_CODECS_H_INCLUDED__
+
+#include <glib.h>
+
 #define A2DP_CODEC_SBC                 0x00
 #define A2DP_CODEC_MPEG12              0x01
 #define A2DP_CODEC_MPEG24              0x02
@@ -85,7 +90,7 @@
 #define MPEG_BIT_RATE_32000            0x0002
 #define MPEG_BIT_RATE_FREE             0x0001
 
-#if __BYTE_ORDER == __LITTLE_ENDIAN
+#if G_BYTE_ORDER == G_LITTLE_ENDIAN
 
 typedef struct {
        uint8_t channel_mode:4;
@@ -107,7 +112,7 @@ typedef struct {
        uint16_t bitrate;
 } __attribute__ ((packed)) a2dp_mpeg_t;
 
-#elif __BYTE_ORDER == __BIG_ENDIAN
+#elif G_BYTE_ORDER == G_BIG_ENDIAN
 
 typedef struct {
        uint8_t frequency:4;
@@ -137,3 +142,5 @@ typedef struct {
        uint8_t vendor_id[4];
        uint8_t codec_id[2];
 } __attribute__ ((packed)) a2dp_vendor_codec_t;
+
+#endif /* #define __GST_BLUEZ_A2DP_CODECS_H_INCLUDED__ */