scripts/functions: Use stat correctly on non-GNU (BSD/Darwin) systems.
Call to get the directory mode depending on $CT_SYS_OS
yann.morin.1998@anciens.enib.fr:
CT_SYS_OS has changed on Linuxsystem, it only gets the kernel name "Linux",
and not the system name, 'GNU/'.
1 diff -urN uClibc-0.9.30.1.orig/include/netinet/igmp.h uClibc-0.9.30.1/include/netinet/igmp.h
2 --- uClibc-0.9.30.1.orig/include/netinet/igmp.h 2009-04-08 09:00:10.926545132 +0200
3 +++ uClibc-0.9.30.1/include/netinet/igmp.h 2009-04-08 09:00:26.242514273 +0200
5 u_int8_t igmp_code; /* routing code */
6 u_int16_t igmp_cksum; /* checksum */
7 struct in_addr igmp_group; /* group address */
9 +} __attribute__ ((__packed__));
13 diff -urN uClibc-0.9.30.1.orig/include/netinet/in.h uClibc-0.9.30.1/include/netinet/in.h
14 --- uClibc-0.9.30.1.orig/include/netinet/in.h 2009-04-08 09:00:10.926545132 +0200
15 +++ uClibc-0.9.30.1/include/netinet/in.h 2009-04-08 09:00:26.242514273 +0200
17 #define s6_addr in6_u.u6_addr8
18 #define s6_addr16 in6_u.u6_addr16
19 #define s6_addr32 in6_u.u6_addr32
21 + } __attribute__ ((__packed__));
23 extern const struct in6_addr in6addr_any; /* :: */
24 extern const struct in6_addr in6addr_loopback; /* ::1 */
26 __SOCKADDR_COMMON_SIZE -
28 sizeof (struct in_addr)];
30 + } __attribute__ ((__packed__));
33 /* Ditto, for IPv6. */
35 uint32_t sin6_flowinfo; /* IPv6 flow information */
36 struct in6_addr sin6_addr; /* IPv6 address */
37 uint32_t sin6_scope_id; /* IPv6 scope-id */
39 + } __attribute__ ((__packed__));
42 /* IPv4 multicast request. */
45 /* Local IP address of interface. */
46 struct in_addr imr_interface;
48 + } __attribute__ ((__packed__));
54 /* IP address of interface. */
55 struct in_addr imr_sourceaddr;
57 + } __attribute__ ((__packed__));
59 /* Likewise, for IPv6. */
64 unsigned int ipv6mr_interface;
66 + } __attribute__ ((__packed__));
69 /* Multicast group request. */
73 struct sockaddr_storage gr_group;
75 + } __attribute__ ((__packed__));
77 struct group_source_req
82 struct sockaddr_storage gsr_source;
84 + } __attribute__ ((__packed__));
87 /* Full-state filter operations. */
90 /* Source addresses. */
91 struct in_addr imsf_slist[1];
93 + } __attribute__ ((__packed__));
95 #define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
96 - sizeof (struct in_addr) \
99 /* Source addresses. */
100 struct sockaddr_storage gf_slist[1];
102 +} __attribute__ ((__packed__));
104 #define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
105 - sizeof (struct sockaddr_storage) \
106 @@ -460,14 +460,14 @@
108 struct in6_addr ipi6_addr; /* src/dst IPv6 address */
109 unsigned int ipi6_ifindex; /* send/recv interface index */
111 + } __attribute__ ((__packed__));
113 /* IPv6 MTU information. */
116 struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
117 uint32_t ip6m_mtu; /* path MTU in host byte order */
119 + } __attribute__ ((__packed__));
122 #if 0 /*def __USE_GNU*/
123 diff -urN uClibc-0.9.30.1.orig/include/netinet/ip.h uClibc-0.9.30.1/include/netinet/ip.h
124 --- uClibc-0.9.30.1.orig/include/netinet/ip.h 2009-04-08 09:00:10.926545132 +0200
125 +++ uClibc-0.9.30.1/include/netinet/ip.h 2009-04-08 09:00:26.242514273 +0200
129 /*The options start here. */
131 + } __attribute__ ((__packed__));
136 u_int8_t ip_p; /* protocol */
137 u_short ip_sum; /* checksum */
138 struct in_addr ip_src, ip_dst; /* source and dest address */
140 + } __attribute__ ((__packed__));
143 * Time stamp option structure.
144 diff -urN uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h uClibc-0.9.30.1/include/netinet/ip_icmp.h
145 --- uClibc-0.9.30.1.orig/include/netinet/ip_icmp.h 2009-04-08 09:00:10.926545132 +0200
146 +++ uClibc-0.9.30.1/include/netinet/ip_icmp.h 2009-04-08 09:00:26.242514273 +0200
149 } frag; /* path mtu discovery */
152 +} __attribute__ ((__packed__));
154 #define ICMP_ECHOREPLY 0 /* Echo Reply */
155 #define ICMP_DEST_UNREACH 3 /* Destination Unreachable */
157 #define icmp_radv icmp_dun.id_radv
158 #define icmp_mask icmp_dun.id_mask
159 #define icmp_data icmp_dun.id_data
161 +} __attribute__ ((__packed__));
164 * Lower bounds on packet lengths for various types.
165 diff -urN uClibc-0.9.30.1.orig/include/netinet/tcp.h uClibc-0.9.30.1/include/netinet/tcp.h
166 --- uClibc-0.9.30.1.orig/include/netinet/tcp.h 2009-04-08 09:00:10.926545132 +0200
167 +++ uClibc-0.9.30.1/include/netinet/tcp.h 2009-04-08 09:00:26.242514273 +0200
169 u_int16_t th_win; /* window */
170 u_int16_t th_sum; /* checksum */
171 u_int16_t th_urp; /* urgent pointer */
173 +} __attribute__ ((__packed__));
175 # else /* !__FAVOR_BSD */
182 +} __attribute__ ((__packed__));
183 # endif /* __FAVOR_BSD */
187 u_int32_t tcpi_rcv_space;
189 u_int32_t tcpi_total_retrans;
191 +} __attribute__ ((__packed__));
194 /* For TCP_MD5SIG socket option. */
196 u_int16_t tcpm_keylen; /* Key length. */
197 u_int32_t __tcpm_pad2; /* Zero. */
198 u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
200 +} __attribute__ ((__packed__));
204 diff -urN uClibc-0.9.30.1.orig/include/netinet/udp.h uClibc-0.9.30.1/include/netinet/udp.h
205 --- uClibc-0.9.30.1.orig/include/netinet/udp.h 2009-04-08 09:00:10.926545132 +0200
206 +++ uClibc-0.9.30.1/include/netinet/udp.h 2009-04-08 09:00:26.242514273 +0200
208 u_int16_t uh_dport; /* destination port */
209 u_int16_t uh_ulen; /* udp length */
210 u_int16_t uh_sum; /* udp checksum */
212 +} __attribute__ ((__packed__));
221 +} __attribute__ ((__packed__));
224 #define SOL_UDP 17 /* sockopt level for UDP */