summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/sap.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/tools/sap.h b/tools/sap.h
index 96bafd16..92a191ec 100644
--- a/tools/sap.h
+++ b/tools/sap.h
@@ -4,13 +4,19 @@
* See the main source file 'xineliboutput.c' for copyright information and
* how to reach the author.
*
- * $Id: sap.h,v 1.3 2006-12-14 14:41:22 phintuka Exp $
+ * $Id: sap.h,v 1.4 2007-01-01 23:40:33 phintuka Exp $
*
*/
#ifndef XINELIBOUTPUT_SAP_H_
#define XINELIBOUTPUT_SAP_H_
+#ifndef PACKED
+# define PACKED __attribute__((packed))
+#else
+# warning PACKED already defined
+#endif
+
#include <arpa/inet.h>
#include <endian.h>
@@ -48,8 +54,8 @@ typedef struct {
uint8_t addr_type : 1;
uint8_t version : 3;
#endif
- } __attribute__((packed));
- } __attribute__((packed));
+ } PACKED;
+ } PACKED;
uint8_t auth_len;
uint16_t msgid_hash;
@@ -57,11 +63,11 @@ typedef struct {
union {
uint8_t u8[4];
uint32_t u32;
- } __attribute__((packed)) ip4_source;
+ } PACKED ip4_source;
char payload[0];
-} __attribute__((packed)) sap_pdu_t;
+} PACKED sap_pdu_t;
static inline sap_pdu_t *sap_create_pdu(uint32_t src_ip,