aboutsummaryrefslogtreecommitdiff
path: root/slirp/ip.h
diff options
context:
space:
mode:
authorStefan Weil <weil@mail.berlios.de>2011-08-31 12:38:01 +0200
committerBlue Swirl <blauwirbel@gmail.com>2011-09-03 10:45:59 +0000
commit541dc0d47f10973c241e9955afc2aefc96adec51 (patch)
tree33d3224319ba8d33738cf5d2073f62687f1352c7 /slirp/ip.h
parent0f7fdd347514ea97b24f5f658f3ae31f9b078397 (diff)
downloadqemu-541dc0d47f10973c241e9955afc2aefc96adec51.zip
qemu-541dc0d47f10973c241e9955afc2aefc96adec51.tar.gz
qemu-541dc0d47f10973c241e9955afc2aefc96adec51.tar.bz2
Use new macro QEMU_PACKED for packed structures
Most changes were made using these commands: git grep -la '__attribute__((packed))'|xargs perl -pi -e 's/__attribute__\(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((packed))'|xargs perl -pi -e 's/__attribute__ \(\(packed\)\)/QEMU_PACKED/' git grep -la '__attribute__((__packed__))'|xargs perl -pi -e 's/__attribute__\(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute__ ((__packed__))'|xargs perl -pi -e 's/__attribute__ \(\(__packed__\)\)/QEMU_PACKED/' git grep -la '__attribute((packed))'|xargs perl -pi -e 's/__attribute\(\(packed\)\)/QEMU_PACKED/' Whitespace in linux-user/syscall_defs.h was fixed manually to avoid warnings from scripts/checkpatch.pl. Manual changes were also applied to hw/pc.c. I did not fix indentation with tabs in block/vvfat.c. The patch will show 4 errors with scripts/checkpatch.pl. Signed-off-by: Stefan Weil <weil@mail.berlios.de> Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
Diffstat (limited to 'slirp/ip.h')
-rw-r--r--slirp/ip.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/slirp/ip.h b/slirp/ip.h
index 72dbe9a..88c903f 100644
--- a/slirp/ip.h
+++ b/slirp/ip.h
@@ -91,7 +91,7 @@ struct ip {
uint8_t ip_p; /* protocol */
uint16_t ip_sum; /* checksum */
struct in_addr ip_src,ip_dst; /* source and dest address */
-} __attribute__((packed));
+} QEMU_PACKED;
#define IP_MAXPACKET 65535 /* maximum packet size */
@@ -153,7 +153,7 @@ struct ip_timestamp {
n_long ipt_time;
} ipt_ta[1];
} ipt_timestamp;
-} __attribute__((packed));
+} QEMU_PACKED;
/* flag bits for ipt_flg */
#define IPOPT_TS_TSONLY 0 /* timestamps only */
@@ -183,11 +183,11 @@ struct ip_timestamp {
struct mbuf_ptr {
struct mbuf *mptr;
uint32_t dummy;
-} __attribute__((packed));
+} QEMU_PACKED;
#else
struct mbuf_ptr {
struct mbuf *mptr;
-} __attribute__((packed));
+} QEMU_PACKED;
#endif
struct qlink {
void *next, *prev;
@@ -203,7 +203,7 @@ struct ipovly {
uint16_t ih_len; /* protocol length */
struct in_addr ih_src; /* source internet address */
struct in_addr ih_dst; /* destination internet address */
-} __attribute__((packed));
+} QEMU_PACKED;
/*
* Ip reassembly queue structure. Each fragment
@@ -219,7 +219,7 @@ struct ipq {
uint8_t ipq_p; /* protocol of this fragment */
uint16_t ipq_id; /* sequence id for reassembly */
struct in_addr ipq_src,ipq_dst;
-} __attribute__((packed));
+} QEMU_PACKED;
/*
* Ip header, when holding a fragment.
@@ -229,7 +229,7 @@ struct ipq {
struct ipasfrag {
struct qlink ipf_link;
struct ip ipf_ip;
-} __attribute__((packed));
+} QEMU_PACKED;
#define ipf_off ipf_ip.ip_off
#define ipf_tos ipf_ip.ip_tos
@@ -248,6 +248,6 @@ struct ipasfrag {
struct ipoption {
struct in_addr ipopt_dst; /* first-hop dst if source routed */
int8_t ipopt_list[MAX_IPOPTLEN]; /* options proper */
-} __attribute__((packed));
+} QEMU_PACKED;
#endif