summaryrefslogtreecommitdiff
path: root/patches/uClibc/0.9.30.2/200-pack-netinet-structs.patch
blob: d727f4da67f2e1a12d7a172ab275822cdabdfccf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
diff -urN uClibc-0.9.30.1.orig/include/netinet/igmp.h uClibc-0.9.30.1/include/netinet/igmp.h
--- uClibc-0.9.30.1.orig/include/netinet/igmp.h	2009-04-08 09:00:10.926545132 +0200
+++ uClibc-0.9.30.1/include/netinet/igmp.h	2009-04-08 09:00:26.242514273 +0200
@@ -69,7 +69,7 @@
   u_int8_t igmp_code;             /* routing code */
   u_int16_t igmp_cksum;           /* checksum */
   struct in_addr igmp_group;      /* group address */
-};
+} __attribute__ ((__packed__));
 
 #define IGMP_MINLEN			8
 
diff -urN uClibc-0.9.30.1.orig/include/netinet/in.h uClibc-0.9.30.1/include/netinet/in.h
--- uClibc-0.9.30.1.orig/include/netinet/in.h	2009-04-08 09:00:10.926545132 +0200
+++ uClibc-0.9.30.1/include/netinet/in.h	2009-04-08 09:00:26.242514273 +0200
@@ -202,7 +202,7 @@
 #define s6_addr			in6_u.u6_addr8
 #define s6_addr16		in6_u.u6_addr16
 #define s6_addr32		in6_u.u6_addr32
-  };
+  } __attribute__ ((__packed__));
 
 extern const struct in6_addr in6addr_any;        /* :: */
 extern const struct in6_addr in6addr_loopback;   /* ::1 */
@@ -229,7 +229,7 @@
 			   __SOCKADDR_COMMON_SIZE -
 			   sizeof (in_port_t) -
 			   sizeof (struct in_addr)];
-  };
+  } __attribute__ ((__packed__));
 #endif
 
 /* Ditto, for IPv6.  */
@@ -240,7 +240,7 @@
     uint32_t sin6_flowinfo;	/* IPv6 flow information */
     struct in6_addr sin6_addr;	/* IPv6 address */
     uint32_t sin6_scope_id;	/* IPv6 scope-id */
-  };
+  } __attribute__ ((__packed__));
 
 
 /* IPv4 multicast request.  */
@@ -251,7 +251,7 @@
 
     /* Local IP address of interface.  */
     struct in_addr imr_interface;
-  };
+  } __attribute__ ((__packed__));
 
 struct ip_mreq_source
   {
@@ -263,7 +263,7 @@
 
     /* IP address of interface.  */
     struct in_addr imr_sourceaddr;
-  };
+  } __attribute__ ((__packed__));
 
 /* Likewise, for IPv6.  */
 struct ipv6_mreq
@@ -273,7 +273,7 @@
 
     /* local interface */
     unsigned int ipv6mr_interface;
-  };
+  } __attribute__ ((__packed__));
 
 
 /* Multicast group request.  */
@@ -284,7 +284,7 @@
 
     /* Group address.  */
     struct sockaddr_storage gr_group;
-  };
+  } __attribute__ ((__packed__));
 
 struct group_source_req
   {
@@ -296,7 +296,7 @@
 
     /* Source address.  */
     struct sockaddr_storage gsr_source;
-  };
+  } __attribute__ ((__packed__));
 
 
 /* Full-state filter operations.  */
@@ -315,7 +315,7 @@
     uint32_t imsf_numsrc;
     /* Source addresses.  */
     struct in_addr imsf_slist[1];
-  };
+  } __attribute__ ((__packed__));
 
 #define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
 				  - sizeof (struct in_addr)		      \
@@ -336,7 +336,7 @@
     uint32_t gf_numsrc;
     /* Source addresses.  */
     struct sockaddr_storage gf_slist[1];
-};
+} __attribute__ ((__packed__));
 
 #define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
 				   - sizeof (struct sockaddr_storage)	      \
@@ -460,14 +460,14 @@
   {
     struct in6_addr ipi6_addr;	/* src/dst IPv6 address */
     unsigned int ipi6_ifindex;	/* send/recv interface index */
-  };
+  } __attribute__ ((__packed__));
 
 /* IPv6 MTU information.  */
 struct ip6_mtuinfo
   {
     struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
     uint32_t ip6m_mtu;		   /* path MTU in host byte order */
-  };
+  } __attribute__ ((__packed__));
 
 
 #if 0 /*def __USE_GNU*/
diff -urN uClibc-0.9.30.1.orig/include/netinet/ip.h uClibc-0.9.30.1/include/netinet/ip.h
--- uClibc-0.9.30.1.orig/include/netinet/ip.h	2009-04-08 09:00:10.926545132 +0200
+++ uClibc-0.9.30.1/include/netinet/ip.h	2009-04-08 09:00:26.242514273 +0200
@@ -63,7 +63,7 @@
     u_int32_t saddr;
     u_int32_t daddr;
     /*The options start here. */
-  };
+  } __attribute__ ((__packed__));
 
 #ifdef __USE_BSD
 /*
@@ -127,7 +127,7 @@
     u_int8_t ip_p;			/* protocol */
     u_short ip_sum;			/* checksum */
     struct in_addr ip_src, ip_dst;	/* source and dest address */
-  };
+  } __attribute__ ((__packed__));
 
 /*
  * Time stamp option structure.
diff -urN uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h uClibc-0.9.30.1/include/netinet/ip_icmp.h
--- uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h	2009-04-08 09:00:10.926545132 +0200
+++ uClibc-0.9.30.1/include/netinet/ip_icmp.h	2009-04-08 09:00:26.242514273 +0200
@@ -43,7 +43,7 @@
       u_int16_t	mtu;
     } frag;			/* path mtu discovery */
   } un;
-};
+} __attribute__ ((__packed__));
 
 #define ICMP_ECHOREPLY		0	/* Echo Reply			*/
 #define ICMP_DEST_UNREACH	3	/* Destination Unreachable	*/
@@ -199,7 +199,7 @@
 #define	icmp_radv	icmp_dun.id_radv
 #define	icmp_mask	icmp_dun.id_mask
 #define	icmp_data	icmp_dun.id_data
-};
+} __attribute__ ((__packed__));
 
 /*
  * Lower bounds on packet lengths for various types.
diff -urN uClibc-0.9.30.1.orig/include/netinet/tcp.h uClibc-0.9.30.1/include/netinet/tcp.h
--- uClibc-0.9.30.1.orig/include/netinet/tcp.h	2009-04-08 09:00:10.926545132 +0200
+++ uClibc-0.9.30.1/include/netinet/tcp.h	2009-04-08 09:00:26.242514273 +0200
@@ -86,7 +86,7 @@
     u_int16_t th_win;		/* window */
     u_int16_t th_sum;		/* checksum */
     u_int16_t th_urp;		/* urgent pointer */
-};
+} __attribute__ ((__packed__));
 
 # else /* !__FAVOR_BSD */
 struct tcphdr
@@ -121,7 +121,7 @@
     u_int16_t window;
     u_int16_t check;
     u_int16_t urg_ptr;
-};
+} __attribute__ ((__packed__));
 # endif /* __FAVOR_BSD */
 
 enum
@@ -226,7 +226,7 @@
   u_int32_t	tcpi_rcv_space;
 
   u_int32_t	tcpi_total_retrans;
-};
+} __attribute__ ((__packed__));
 
 
 /* For TCP_MD5SIG socket option.  */
@@ -239,7 +239,7 @@
   u_int16_t	tcpm_keylen;			/* Key length.  */
   u_int32_t	__tcpm_pad2;			/* Zero.  */
   u_int8_t	tcpm_key[TCP_MD5SIG_MAXKEYLEN];	/* Key (binary).  */
-};
+} __attribute__ ((__packed__));
 
 #endif /* Misc.  */
 
diff -urN uClibc-0.9.30.1.orig/include/netinet/udp.h uClibc-0.9.30.1/include/netinet/udp.h
--- uClibc-0.9.30.1.orig/include/netinet/udp.h	2009-04-08 09:00:10.926545132 +0200
+++ uClibc-0.9.30.1/include/netinet/udp.h	2009-04-08 09:00:26.242514273 +0200
@@ -61,7 +61,7 @@
   u_int16_t uh_dport;		/* destination port */
   u_int16_t uh_ulen;		/* udp length */
   u_int16_t uh_sum;		/* udp checksum */
-};
+} __attribute__ ((__packed__));
 
 #else
 
@@ -71,7 +71,7 @@
   u_int16_t dest;
   u_int16_t len;
   u_int16_t check;
-};
+} __attribute__ ((__packed__));
 #endif
 
 #define SOL_UDP            17      /* sockopt level for UDP */