Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo commit in src/patchsets/uclibc/0.9.28.3: 04_all_uClibc-netinet-headers-update.patch 05_all_uClibc-netinet-headers-update.patch 06_all_uClibc-netinet-headers-update.patch 09_all_uClibc-inotify.patch 35_all_uClibc-gcc-4.3.patch 45_all_uClibc-ppoll.patch 46_all_uClibc-ppoll.patch 47_all_uClibc-ppoll.patch
Date: Fri, 28 Aug 2009 20:15:49
Message-Id: E1MfrL9-0003p6-RO@stork.gentoo.org
1 vapier 09/08/25 08:25:15
2
3 Added: 04_all_uClibc-netinet-headers-update.patch
4 05_all_uClibc-netinet-headers-update.patch
5 06_all_uClibc-netinet-headers-update.patch
6 09_all_uClibc-inotify.patch
7 35_all_uClibc-gcc-4.3.patch
8 45_all_uClibc-ppoll.patch 46_all_uClibc-ppoll.patch
9 47_all_uClibc-ppoll.patch
10 Log:
11 import updates to build latest stable utils (iproute/udev/etc...)
12
13 Revision Changes Path
14 1.1 src/patchsets/uclibc/0.9.28.3/04_all_uClibc-netinet-headers-update.patch
15
16 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/04_all_uClibc-netinet-headers-update.patch?rev=1.1&view=markup
17 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/04_all_uClibc-netinet-headers-update.patch?rev=1.1&content-type=text/plain
18
19 Index: 04_all_uClibc-netinet-headers-update.patch
20 ===================================================================
21 From eb1c3012e66fc6a966d5d90e14752a13d3a2f407 Mon Sep 17 00:00:00 2001
22 From: Mike Frysinger <vapier@g.o>
23 Date: Wed, 9 Nov 2005 03:08:14 +0000
24 Subject: [PATCH 1/1] sync with glibc
25
26 ---
27 libc/sysdeps/linux/common/bits/in.h | 39 ++++++++---
28 libc/sysdeps/linux/common/bits/ioctls.h | 3 +-
29
30 diff --git a/libc/sysdeps/linux/common/bits/in.h b/libc/sysdeps/linux/common/bits/in.h
31 index e6cf575..14d3db8 100644
32 --- a/libc/sysdeps/linux/common/bits/in.h
33 +++ b/libc/sysdeps/linux/common/bits/in.h
34 @@ -1,4 +1,4 @@
35 -/* Copyright (C) 1991-1999, 2000 Free Software Foundation, Inc.
36 +/* Copyright (C) 1991-1999, 2000, 2004 Free Software Foundation, Inc.
37 This file is part of the GNU C Library.
38
39 The GNU C Library is free software; you can redistribute it and/or
40 @@ -30,8 +30,8 @@
41 #define IP_HDRINCL 3 /* int; Header is included with data. */
42 #define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */
43 #define IP_ROUTER_ALERT 5 /* bool */
44 -#define IP_RECVOPTS 6 /* bool */
45 -#define IP_RETOPTS 7 /* bool */
46 +#define IP_RECVOPTS 6 /* bool; Receive all IP options w/datagram. */
47 +#define IP_RETOPTS 7 /* bool; Set/get IP per-packet options. */
48 #define IP_PKTINFO 8 /* bool */
49 #define IP_PKTOPTIONS 9
50 #define IP_PMTUDISC 10 /* obsolete name? */
51 @@ -44,9 +44,24 @@
52 #define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */
53 #define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */
54 #define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */
55 +#define IP_UNBLOCK_SOURCE 37 /* ip_mreq_source: unblock data from source */
56 +#define IP_BLOCK_SOURCE 38 /* ip_mreq_source: block data from source */
57 +#define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
58 +#define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
59 +#define IP_MSFILTER 41
60 +#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
61 +#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
62 +#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
63 +#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
64 +#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
65 +#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
66 +#define MCAST_MSFILTER 48
67 +
68 +#define MCAST_EXCLUDE 0
69 +#define MCAST_INCLUDE 1
70
71 /* For BSD compatibility. */
72 -#define IP_RECVRETOPTS IP_RETOPTS
73 +#define IP_RECVRETOPTS IP_RETOPTS /* bool; Receive IP options for response. */
74
75 /* IP_MTU_DISCOVER arguments. */
76 #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */
77 @@ -60,9 +75,9 @@
78 #define IP_DEFAULT_MULTICAST_LOOP 1
79 #define IP_MAX_MEMBERSHIPS 20
80
81 -/* Structure used to describe IP options for IP_OPTIONS. The `ip_dst'
82 - field is used for the first-hop gateway when using a source route
83 - (this gets put into the header proper). */
84 +/* Structure used to describe IP options for IP_OPTIONS and IP_RETOPTS.
85 + The `ip_dst' field is used for the first-hop gateway when using a
86 + source route (this gets put into the header proper). */
87 struct ip_opts
88 {
89 struct in_addr ip_dst; /* First hop; zero without source route. */
90 diff --git a/libc/sysdeps/linux/common/bits/ioctls.h b/libc/sysdeps/linux/common/bits/ioctls.h
91 index b49ca20..11bb4c4 100644
92 --- a/libc/sysdeps/linux/common/bits/ioctls.h
93 +++ b/libc/sysdeps/linux/common/bits/ioctls.h
94 @@ -1,4 +1,4 @@
95 -/* Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc.
96 +/* Copyright (C) 1996, 1997, 1998, 2003 Free Software Foundation, Inc.
97 This file is part of the GNU C Library.
98
99 The GNU C Library is free software; you can redistribute it and/or
100 @@ -48,6 +48,7 @@
101 #define SIOCSIFMEM 0x8920 /* set memory address (BSD) */
102 #define SIOCGIFMTU 0x8921 /* get MTU size */
103 #define SIOCSIFMTU 0x8922 /* set MTU size */
104 +#define SIOCSIFNAME 0x8923 /* set interface name */
105 #define SIOCSIFHWADDR 0x8924 /* set hardware address */
106 #define SIOCGIFENCAP 0x8925 /* get/set encapsulations */
107 #define SIOCSIFENCAP 0x8926
108 --
109 1.6.4
110
111
112
113
114 1.1 src/patchsets/uclibc/0.9.28.3/05_all_uClibc-netinet-headers-update.patch
115
116 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/05_all_uClibc-netinet-headers-update.patch?rev=1.1&view=markup
117 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/05_all_uClibc-netinet-headers-update.patch?rev=1.1&content-type=text/plain
118
119 Index: 05_all_uClibc-netinet-headers-update.patch
120 ===================================================================
121 From 618e8ec63d29c58c85895feec79d3ce1ca4cb1a9 Mon Sep 17 00:00:00 2001
122 From: Peter Kjellerstedt <peter.kjellerstedt@××××.com>
123 Date: Wed, 22 Feb 2006 08:48:45 +0000
124 Subject: [PATCH 1/1] Sync with glibc 2.3.6.
125
126 ---
127 include/netinet/in.h | 150 +++++++++++++++++++++++++++++++++-
128 libc/sysdeps/linux/common/bits/in.h | 96 ++++++++++++----------
129 2 files changed, 198 insertions(+), 48 deletions(-)
130
131 diff --git a/include/netinet/in.h b/include/netinet/in.h
132 index 85f780c..935886e 100644
133 --- a/include/netinet/in.h
134 +++ b/include/netinet/in.h
135 @@ -1,4 +1,4 @@
136 -/* Copyright (C) 1991-1999, 2000, 2001 Free Software Foundation, Inc.
137 +/* Copyright (C) 1991-2001, 2003, 2004 Free Software Foundation, Inc.
138 This file is part of the GNU C Library.
139
140 The GNU C Library is free software; you can redistribute it and/or
141 @@ -21,6 +21,7 @@
142
143 #include <features.h>
144 #include <stdint.h>
145 +#include <sys/socket.h>
146 #include <bits/types.h>
147
148
149 @@ -79,6 +80,8 @@ enum
150 #define IPPROTO_PIM IPPROTO_PIM
151 IPPROTO_COMP = 108, /* Compression Header Protocol. */
152 #define IPPROTO_COMP IPPROTO_COMP
153 + IPPROTO_SCTP = 132, /* Stream Control Transmission Protocol. */
154 +#define IPPROTO_SCTP IPPROTO_SCTP
155 IPPROTO_RAW = 255, /* Raw IP packets. */
156 #define IPPROTO_RAW IPPROTO_RAW
157 IPPROTO_MAX
158 @@ -236,7 +239,30 @@ struct sockaddr_in6
159 uint32_t sin6_scope_id; /* IPv6 scope-id */
160 };
161
162 -/* IPv6 multicast request. */
163 +
164 +/* IPv4 multicast request. */
165 +struct ip_mreq
166 + {
167 + /* IP multicast address of group. */
168 + struct in_addr imr_multiaddr;
169 +
170 + /* Local IP address of interface. */
171 + struct in_addr imr_interface;
172 + };
173 +
174 +struct ip_mreq_source
175 + {
176 + /* IP multicast address of group. */
177 + struct in_addr imr_multiaddr;
178 +
179 + /* IP address of source. */
180 + struct in_addr imr_interface;
181 +
182 + /* IP address of interface. */
183 + struct in_addr imr_sourceaddr;
184 + };
185 +
186 +/* Likewise, for IPv6. */
187 struct ipv6_mreq
188 {
189 /* IPv6 multicast address of group */
190 @@ -246,6 +272,75 @@ struct ipv6_mreq
191 unsigned int ipv6mr_interface;
192 };
193
194 +
195 +/* Multicast group request. */
196 +struct group_req
197 + {
198 + /* Interface index. */
199 + uint32_t gr_interface;
200 +
201 + /* Group address. */
202 + struct sockaddr_storage gr_group;
203 + };
204 +
205 +struct group_source_req
206 + {
207 + /* Interface index. */
208 + uint32_t gsr_interface;
209 +
210 + /* Group address. */
211 + struct sockaddr_storage gsr_group;
212 +
213 + /* Source address. */
214 + struct sockaddr_storage gsr_source;
215 + };
216 +
217 +
218 +/* Full-state filter operations. */
219 +struct ip_msfilter
220 + {
221 + /* IP multicast address of group. */
222 + struct in_addr imsf_multiaddr;
223 +
224 + /* Local IP address of interface. */
225 + struct in_addr imsf_interface;
226 +
227 + /* Filter mode. */
228 + uint32_t imsf_fmode;
229 +
230 + /* Number of source addresses. */
231 + uint32_t imsf_numsrc;
232 + /* Source addresses. */
233 + struct in_addr imsf_slist[1];
234 + };
235 +
236 +#define IP_MSFILTER_SIZE(numsrc) (sizeof (struct ip_msfilter) \
237 + - sizeof (struct in_addr) \
238 + + (numsrc) * sizeof (struct in_addr))
239 +
240 +struct group_filter
241 + {
242 + /* Interface index. */
243 + uint32_t gf_interface;
244 +
245 + /* Group address. */
246 + struct sockaddr_storage gf_group;
247 +
248 + /* Filter mode. */
249 + uint32_t gf_fmode;
250 +
251 + /* Number of source addresses. */
252 + uint32_t gf_numsrc;
253 + /* Source addresses. */
254 + struct sockaddr_storage gf_slist[1];
255 +};
256 +
257 +#define GROUP_FILTER_SIZE(numsrc) (sizeof (struct group_filter) \
258 + - sizeof (struct sockaddr_storage) \
259 + + ((numsrc) \
260 + * sizeof (struct sockaddr_storage)))
261 +
262 +
263 /* Get system-specific definitions. */
264 #include <bits/in.h>
265
266 @@ -269,9 +364,6 @@ extern uint16_t htons (uint16_t __hostshort)
267 /* Get machine dependent optimized versions of byte swapping functions. */
268 #include <bits/byteswap.h>
269
270 -#ifndef __OPTIMIZE__
271 -#define __OPTIMIZE__
272 -#endif
273 #ifdef __OPTIMIZE__
274 /* We can optimize calls to the conversion functions. Either nothing has
275 to be done or we are using directly the byte-swapping functions which
276 @@ -367,6 +459,54 @@ struct in6_pktinfo
277 unsigned int ipi6_ifindex; /* send/recv interface index */
278 };
279
280 +
281 +#if 0 /*def __USE_GNU*/
282 +/* Hop-by-Hop and Destination Options Processing. */
283 +extern int inet6_option_space (int __nbytes) __THROW;
284 +extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
285 + int __type) __THROW;
286 +extern int inet6_option_append (struct cmsghdr *__cmsg,
287 + __const uint8_t *__typep, int __multx,
288 + int __plusy) __THROW;
289 +extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
290 + int __multx, int __plusy) __THROW;
291 +extern int inet6_option_next (__const struct cmsghdr *__cmsg,
292 + uint8_t **__tptrp) __THROW;
293 +extern int inet6_option_find (__const struct cmsghdr *__cmsg,
294 + uint8_t **__tptrp, int __type) __THROW;
295 +
296 +
297 +/* Multicast source filter support. */
298 +
299 +/* Get IPv4 source filter. */
300 +extern int getipv4sourcefilter (int __s, struct in_addr __interface_addr,
301 + struct in_addr __group, uint32_t *__fmode,
302 + uint32_t *__numsrc, struct in_addr *__slist)
303 + __THROW;
304 +
305 +/* Set IPv4 source filter. */
306 +extern int setipv4sourcefilter (int __s, struct in_addr __interface_addr,
307 + struct in_addr __group, uint32_t __fmode,
308 + uint32_t __numsrc,
309 + __const struct in_addr *__slist)
310 + __THROW;
311 +
312 +
313 +/* Get source filter. */
314 +extern int getsourcefilter (int __s, uint32_t __interface_addr,
315 + __const struct sockaddr *__group,
316 + socklen_t __grouplen, uint32_t *__fmode,
317 + uint32_t *__numsrc,
318 + struct sockaddr_storage *__slist) __THROW;
319 +
320 +/* Set source filter. */
321 +extern int setsourcefilter (int __s, uint32_t __interface_addr,
322 + __const struct sockaddr *__group,
323 + socklen_t __grouplen, uint32_t __fmode,
324 + uint32_t __numsrc,
325 + __const struct sockaddr_storage *__slist) __THROW;
326 +#endif /* use GNU */
327 +
328 __END_DECLS
329
330 #endif /* netinet/in.h */
331 diff --git a/libc/sysdeps/linux/common/bits/in.h b/libc/sysdeps/linux/common/bits/in.h
332 index 14d3db8..6880a2e 100644
333 --- a/libc/sysdeps/linux/common/bits/in.h
334 +++ b/libc/sysdeps/linux/common/bits/in.h
335 @@ -25,13 +25,36 @@
336 /* Options for use with `getsockopt' and `setsockopt' at the IP level.
337 The first word in the comment at the right is the data type used;
338 "bool" means a boolean value stored in an `int'. */
339 -#define IP_TOS 1 /* int; IP type of service and precedence. */
340 -#define IP_TTL 2 /* int; IP time to live. */
341 -#define IP_HDRINCL 3 /* int; Header is included with data. */
342 -#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */
343 +#define IP_OPTIONS 4 /* ip_opts; IP per-packet options. */
344 +#define IP_HDRINCL 3 /* int; Header is included with data. */
345 +#define IP_TOS 1 /* int; IP type of service and precedence. */
346 +#define IP_TTL 2 /* int; IP time to live. */
347 +#define IP_RECVOPTS 6 /* bool; Receive all IP options w/datagram. */
348 +/* For BSD compatibility. */
349 +#define IP_RECVRETOPTS IP_RETOPTS /* bool; Receive IP options for response. */
350 +#define IP_RETOPTS 7 /* ip_opts; Set/get IP per-packet options. */
351 +#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */
352 +#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */
353 +#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */
354 +#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */
355 +#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */
356 +#define IP_UNBLOCK_SOURCE 37 /* ip_mreq_source: unblock data from source */
357 +#define IP_BLOCK_SOURCE 38 /* ip_mreq_source: block data from source */
358 +#define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
359 +#define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
360 +#define IP_MSFILTER 41
361 +#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
362 +#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
363 +#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
364 +#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
365 +#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
366 +#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
367 +#define MCAST_MSFILTER 48
368 +
369 +#define MCAST_EXCLUDE 0
370 +#define MCAST_INCLUDE 1
371 +
372 #define IP_ROUTER_ALERT 5 /* bool */
373 -#define IP_RECVOPTS 6 /* bool; Receive all IP options w/datagram. */
374 -#define IP_RETOPTS 7 /* bool; Set/get IP per-packet options. */
375 #define IP_PKTINFO 8 /* bool */
376 #define IP_PKTOPTIONS 9
377 #define IP_PMTUDISC 10 /* obsolete name? */
378 @@ -39,29 +62,7 @@
379 #define IP_RECVERR 11 /* bool */
380 #define IP_RECVTTL 12 /* bool */
381 #define IP_RECVTOS 13 /* bool */
382 -#define IP_MULTICAST_IF 32 /* in_addr; set/get IP multicast i/f */
383 -#define IP_MULTICAST_TTL 33 /* u_char; set/get IP multicast ttl */
384 -#define IP_MULTICAST_LOOP 34 /* i_char; set/get IP multicast loopback */
385 -#define IP_ADD_MEMBERSHIP 35 /* ip_mreq; add an IP group membership */
386 -#define IP_DROP_MEMBERSHIP 36 /* ip_mreq; drop an IP group membership */
387 -#define IP_UNBLOCK_SOURCE 37 /* ip_mreq_source: unblock data from source */
388 -#define IP_BLOCK_SOURCE 38 /* ip_mreq_source: block data from source */
389 -#define IP_ADD_SOURCE_MEMBERSHIP 39 /* ip_mreq_source: join source group */
390 -#define IP_DROP_SOURCE_MEMBERSHIP 40 /* ip_mreq_source: leave source group */
391 -#define IP_MSFILTER 41
392 -#define MCAST_JOIN_GROUP 42 /* group_req: join any-source group */
393 -#define MCAST_BLOCK_SOURCE 43 /* group_source_req: block from given group */
394 -#define MCAST_UNBLOCK_SOURCE 44 /* group_source_req: unblock from given group*/
395 -#define MCAST_LEAVE_GROUP 45 /* group_req: leave any-source group */
396 -#define MCAST_JOIN_SOURCE_GROUP 46 /* group_source_req: join source-spec gr */
397 -#define MCAST_LEAVE_SOURCE_GROUP 47 /* group_source_req: leave source-spec gr*/
398 -#define MCAST_MSFILTER 48
399
400 -#define MCAST_EXCLUDE 0
401 -#define MCAST_INCLUDE 1
402 -
403 -/* For BSD compatibility. */
404 -#define IP_RECVRETOPTS IP_RETOPTS /* bool; Receive IP options for response. */
405
406 /* IP_MTU_DISCOVER arguments. */
407 #define IP_PMTUDISC_DONT 0 /* Never send DF frames. */
408 @@ -84,14 +85,7 @@ struct ip_opts
409 char ip_opts[40]; /* Actually variable in size. */
410 };
411
412 -/* Structure used for IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP. */
413 -struct ip_mreq
414 - {
415 - struct in_addr imr_multiaddr; /* IP multicast address of group */
416 - struct in_addr imr_interface; /* local IP address of interface */
417 - };
418 -
419 -/* As above but including interface specification by index. */
420 +/* Like `struct ip_mreq' but including interface specification by index. */
421 struct ip_mreqn
422 {
423 struct in_addr imr_multiaddr; /* IP multicast address of group */
424 @@ -111,13 +105,16 @@ struct in_pktinfo
425 The first word in the comment at the right is the data type used;
426 "bool" means a boolean value stored in an `int'. */
427 #define IPV6_ADDRFORM 1
428 -#define IPV6_PKTINFO 2
429 -#define IPV6_HOPOPTS 3
430 -#define IPV6_DSTOPTS 4
431 -#define IPV6_RTHDR 5
432 -#define IPV6_PKTOPTIONS 6
433 +#define IPV6_2292PKTINFO 2
434 +#define IPV6_2292HOPOPTS 3
435 +#define IPV6_2292DSTOPTS 4
436 +#define IPV6_2292RTHDR 5
437 +#define IPV6_2292PKTOPTIONS 6
438 #define IPV6_CHECKSUM 7
439 -#define IPV6_HOPLIMIT 8
440 +#define IPV6_2292HOPLIMIT 8
441 +
442 +#define SCM_SRCRT IPV6_RXSRCRT
443 +
444 #define IPV6_NEXTHOP 9
445 #define IPV6_AUTHHDR 10
446 #define IPV6_UNICAST_HOPS 16
447 @@ -136,7 +133,20 @@ struct in_pktinfo
448 #define IPV6_IPSEC_POLICY 34
449 #define IPV6_XFRM_POLICY 35
450
451 -#define SCM_SRCRT IPV6_RXSRCRT
452 +#define IPV6_RECVPKTINFO 49
453 +#define IPV6_PKTINFO 50
454 +#define IPV6_RECVHOPLIMIT 51
455 +#define IPV6_HOPLIMIT 52
456 +#define IPV6_RECVHOPOPTS 53
457 +#define IPV6_HOPOPTS 54
458 +#define IPV6_RTHDRDSTOPTS 55
459 +#define IPV6_RECVRTHDR 56
460 +#define IPV6_RTHDR 57
461 +#define IPV6_RECVDSTOPTS 58
462 +#define IPV6_DSTOPTS 59
463 +
464 +#define IPV6_RECVTCLASS 66
465 +#define IPV6_TCLASS 67
466
467 /* Obsolete synonyms for the above. */
468 #define IPV6_ADD_MEMBERSHIP IPV6_JOIN_GROUP
469 --
470 1.6.4
471
472
473
474 1.1 src/patchsets/uclibc/0.9.28.3/06_all_uClibc-netinet-headers-update.patch
475
476 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/06_all_uClibc-netinet-headers-update.patch?rev=1.1&view=markup
477 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/06_all_uClibc-netinet-headers-update.patch?rev=1.1&content-type=text/plain
478
479 Index: 06_all_uClibc-netinet-headers-update.patch
480 ===================================================================
481 From 4c49fbb6b5aeae1767d68e2cc62e2734c87ab766 Mon Sep 17 00:00:00 2001
482 From: Mike Frysinger <vapier@g.o>
483 Date: Fri, 11 Jan 2008 09:14:21 +0000
484 Subject: [PATCH 1/1] cull useless headers and import a few updates from glibc
485
486 ---
487 include/netinet/in.h | 62 +++++++++++++++++++++++++++++++++------
488 include/netinet/ip_fw.h | 1 -
489 include/netinet/ip_tcp.h | 72 ----------------------------------------------
490 include/netinet/ip_udp.h | 1 -
491 include/netinet/tcp.h | 21 +++++++++++++
492 include/netinet/udp.h | 60 ++++++++++++++++++++++++++-----------
493 6 files changed, 115 insertions(+), 102 deletions(-)
494 delete mode 100644 include/netinet/ip_fw.h
495 delete mode 100644 include/netinet/ip_tcp.h
496 delete mode 100644 include/netinet/ip_udp.h
497
498 diff --git a/include/netinet/in.h b/include/netinet/in.h
499 index 935886e..018b39b 100644
500 --- a/include/netinet/in.h
501 +++ b/include/netinet/in.h
502 @@ -1,4 +1,5 @@
503 -/* Copyright (C) 1991-2001, 2003, 2004 Free Software Foundation, Inc.
504 +/* Copyright (C) 1991-2001, 2003, 2004, 2006, 2007
505 + Free Software Foundation, Inc.
506 This file is part of the GNU C Library.
507
508 The GNU C Library is free software; you can redistribute it and/or
509 @@ -455,25 +456,66 @@ extern int bindresvport6 (int __sockfd, struct sockaddr_in6 *__sock_in)
510 /* IPv6 packet information. */
511 struct in6_pktinfo
512 {
513 - struct in6_addr ipi6_addr; /* src/dst IPv6 address */
514 - unsigned int ipi6_ifindex; /* send/recv interface index */
515 + struct in6_addr ipi6_addr; /* src/dst IPv6 address */
516 + unsigned int ipi6_ifindex; /* send/recv interface index */
517 + };
518 +
519 +/* IPv6 MTU information. */
520 +struct ip6_mtuinfo
521 + {
522 + struct sockaddr_in6 ip6m_addr; /* dst address including zone ID */
523 + uint32_t ip6m_mtu; /* path MTU in host byte order */
524 };
525
526
527 #if 0 /*def __USE_GNU*/
528 -/* Hop-by-Hop and Destination Options Processing. */
529 -extern int inet6_option_space (int __nbytes) __THROW;
530 +/* Obsolete hop-by-hop and Destination Options Processing (RFC 2292). */
531 +extern int inet6_option_space (int __nbytes)
532 + __THROW __attribute_deprecated__;
533 extern int inet6_option_init (void *__bp, struct cmsghdr **__cmsgp,
534 - int __type) __THROW;
535 + int __type) __THROW __attribute_deprecated__;
536 extern int inet6_option_append (struct cmsghdr *__cmsg,
537 __const uint8_t *__typep, int __multx,
538 - int __plusy) __THROW;
539 + int __plusy) __THROW __attribute_deprecated__;
540 extern uint8_t *inet6_option_alloc (struct cmsghdr *__cmsg, int __datalen,
541 - int __multx, int __plusy) __THROW;
542 + int __multx, int __plusy)
543 + __THROW __attribute_deprecated__;
544 extern int inet6_option_next (__const struct cmsghdr *__cmsg,
545 - uint8_t **__tptrp) __THROW;
546 + uint8_t **__tptrp)
547 + __THROW __attribute_deprecated__;
548 extern int inet6_option_find (__const struct cmsghdr *__cmsg,
549 - uint8_t **__tptrp, int __type) __THROW;
550 + uint8_t **__tptrp, int __type)
551 + __THROW __attribute_deprecated__;
552 +
553 +
554 +/* Hop-by-Hop and Destination Options Processing (RFC 3542). */
555 +extern int inet6_opt_init (void *__extbuf, socklen_t __extlen) __THROW;
556 +extern int inet6_opt_append (void *__extbuf, socklen_t __extlen, int __offset,
557 + uint8_t __type, socklen_t __len, uint8_t __align,
558 + void **__databufp) __THROW;
559 +extern int inet6_opt_finish (void *__extbuf, socklen_t __extlen, int __offset)
560 + __THROW;
561 +extern int inet6_opt_set_val (void *__databuf, int __offset, void *__val,
562 + socklen_t __vallen) __THROW;
563 +extern int inet6_opt_next (void *__extbuf, socklen_t __extlen, int __offset,
564 + uint8_t *__typep, socklen_t *__lenp,
565 + void **__databufp) __THROW;
566 +extern int inet6_opt_find (void *__extbuf, socklen_t __extlen, int __offset,
567 + uint8_t __type, socklen_t *__lenp,
568 + void **__databufp) __THROW;
569 +extern int inet6_opt_get_val (void *__databuf, int __offset, void *__val,
570 + socklen_t __vallen) __THROW;
571 +
572 +
573 +/* Routing Header Option (RFC 3542). */
574 +extern socklen_t inet6_rth_space (int __type, int __segments) __THROW;
575 +extern void *inet6_rth_init (void *__bp, socklen_t __bp_len, int __type,
576 + int __segments) __THROW;
577 +extern int inet6_rth_add (void *__bp, __const struct in6_addr *__addr) __THROW;
578 +extern int inet6_rth_reverse (__const void *__in, void *__out) __THROW;
579 +extern int inet6_rth_segments (__const void *__bp) __THROW;
580 +extern struct in6_addr *inet6_rth_getaddr (__const void *__bp, int __index)
581 + __THROW;
582
583
584 /* Multicast source filter support. */
585 diff --git a/include/netinet/ip_fw.h b/include/netinet/ip_fw.h
586 deleted file mode 100644
587 index 278a039..0000000
588 --- a/include/netinet/ip_fw.h
589 +++ /dev/null
590 @@ -1 +0,0 @@
591 -#include <linux/ip_fw.h>
592 diff --git a/include/netinet/ip_tcp.h b/include/netinet/ip_tcp.h
593 deleted file mode 100644
594 index 600aebc..0000000
595 --- a/include/netinet/ip_tcp.h
596 +++ /dev/null
597 @@ -1,72 +0,0 @@
598 -/*
599 - * Copyright (c) 1982, 1986 Regents of the University of California.
600 - * All rights reserved.
601 - *
602 - * Redistribution and use in source and binary forms are permitted
603 - * provided that the above copyright notice and this paragraph are
604 - * duplicated in all such forms and that any documentation,
605 - * advertising materials, and other materials related to such
606 - * distribution and use acknowledge that the software was developed
607 - * by the University of California, Berkeley. The name of the
608 - * University may not be used to endorse or promote products derived
609 - * from this software without specific prior written permission.
610 - * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR
611 - * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
612 - * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
613 - *
614 - * @(#)tcp.h 7.5 (Berkeley) 6/29/88
615 - */
616 -
617 -#ifndef _NETINET_IP_TCP_H
618 -#define _NETINET_IP_TCP_H
619 -
620 -#include <endian.h>
621 -#include <linux/socket.h>
622 -#include <sys/types.h>
623 -
624 -typedef u_int32_t tcp_seq;
625 -/*
626 - * TCP header.
627 - * Per RFC 793, September, 1981.
628 - */
629 -struct tcphdr {
630 - u_short th_sport; /* source port */
631 - u_short th_dport; /* destination port */
632 - tcp_seq th_seq; /* sequence number */
633 - tcp_seq th_ack; /* acknowledgement number */
634 -#if __BYTE_ORDER == __LITTLE_ENDIAN
635 - u_char th_x2:4, /* (unused) */
636 - th_off:4; /* data offset */
637 -#endif
638 -#if __BYTE_ORDER == __BIG_ENDIAN
639 - u_char th_off:4, /* data offset */
640 - th_x2:4; /* (unused) */
641 -#endif
642 - u_char th_flags;
643 -#define TH_FIN 0x01
644 -#define TH_SYN 0x02
645 -#define TH_RST 0x04
646 -#define TH_PUSH 0x08
647 -#define TH_ACK 0x10
648 -#define TH_URG 0x20
649 - u_short th_win; /* window */
650 - u_short th_sum; /* checksum */
651 - u_short th_urp; /* urgent pointer */
652 -};
653 -
654 -#define TCPOPT_EOL 0
655 -#define TCPOPT_NOP 1
656 -#define TCPOPT_MAXSEG 2
657 -
658 -/*
659 - * Default maximum segment size for TCP.
660 - * With an IP MSS of 576, this is 536,
661 - * but 512 is probably more convenient.
662 - */
663 -#ifdef lint
664 -#define TCP_MSS 536
665 -#else
666 -#define TCP_MSS MIN(512, IP_MSS - sizeof (struct tcpiphdr))
667 -#endif
668 -
669 -#endif /* _NETINET_TCP_H */
670 diff --git a/include/netinet/ip_udp.h b/include/netinet/ip_udp.h
671 deleted file mode 100644
672 index 3f0d8ef..0000000
673 --- a/include/netinet/ip_udp.h
674 +++ /dev/null
675 @@ -1 +0,0 @@
676 -#include <linux/udp.h>
677 diff --git a/include/netinet/tcp.h b/include/netinet/tcp.h
678 index 87099ec..06e8414 100644
679 --- a/include/netinet/tcp.h
680 +++ b/include/netinet/tcp.h
681 @@ -49,9 +49,12 @@
682 #define TCP_WINDOW_CLAMP 10 /* Bound advertised window */
683 #define TCP_INFO 11 /* Information about this connection. */
684 #define TCP_QUICKACK 12 /* Bock/reenable quick ACKs. */
685 +#define TCP_CONGESTION 13 /* Congestion control algorithm. */
686 +#define TCP_MD5SIG 14 /* TCP MD5 Signature (RFC2385) */
687
688 #ifdef __USE_MISC
689 # include <sys/types.h>
690 +# include <sys/socket.h>
691
692 # ifdef __FAVOR_BSD
693 typedef u_int32_t tcp_seq;
694 @@ -218,6 +221,24 @@ struct tcp_info
695 u_int32_t tcpi_snd_cwnd;
696 u_int32_t tcpi_advmss;
697 u_int32_t tcpi_reordering;
698 +
699 + u_int32_t tcpi_rcv_rtt;
700 + u_int32_t tcpi_rcv_space;
701 +
702 + u_int32_t tcpi_total_retrans;
703 +};
704 +
705 +
706 +/* For TCP_MD5SIG socket option. */
707 +#define TCP_MD5SIG_MAXKEYLEN 80
708 +
709 +struct tcp_md5sig
710 +{
711 + struct sockaddr_storage tcpm_addr; /* Address associated. */
712 + u_int16_t __tcpm_pad1; /* Zero. */
713 + u_int16_t tcpm_keylen; /* Key length. */
714 + u_int32_t __tcpm_pad2; /* Zero. */
715 + u_int8_t tcpm_key[TCP_MD5SIG_MAXKEYLEN]; /* Key (binary). */
716 };
717
718 #endif /* Misc. */
719 diff --git a/include/netinet/udp.h b/include/netinet/udp.h
720 index 5be4bbd..45b69f7 100644
721 --- a/include/netinet/udp.h
722 +++ b/include/netinet/udp.h
723 @@ -1,4 +1,4 @@
724 -/* Copyright (C) 1991, 92, 93, 95, 96, 97 Free Software Foundation, Inc.
725 +/* Copyright (C) 1991, 92, 93, 95, 96, 97, 2004 Free Software Foundation, Inc.
726 This file is part of the GNU C Library.
727
728 The GNU C Library is free software; you can redistribute it and/or
729 @@ -17,39 +17,63 @@
730 02111-1307 USA. */
731
732 /*
733 - * Copyright (c) 1982, 1986 Regents of the University of California.
734 - * All rights reserved. The Berkeley software License Agreement
735 - * specifies the terms and conditions for redistribution.
736 + * Copyright (C) 1982, 1986 Regents of the University of California.
737 + * All rights reserved.
738 + *
739 + * Redistribution and use in source and binary forms, with or without
740 + * modification, are permitted provided that the following conditions
741 + * are met:
742 + * 1. Redistributions of source code must retain the above copyright
743 + * notice, this list of conditions and the following disclaimer.
744 + * 2. Redistributions in binary form must reproduce the above copyright
745 + * notice, this list of conditions and the following disclaimer in the
746 + * documentation and/or other materials provided with the distribution.
747 + * 4. Neither the name of the University nor the names of its contributors
748 + * may be used to endorse or promote products derived from this software
749 + * without specific prior written permission.
750 + *
751 + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
752 + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
753 + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
754 + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
755 + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
756 + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
757 + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
758 + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
759 + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
760 + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
761 + * SUCH DAMAGE.
762 */
763
764 #ifndef __NETINET_UDP_H
765 #define __NETINET_UDP_H 1
766
767 -#include <sys/cdefs.h>
768 +#include <features.h>
769 #include <sys/types.h>
770
771 -__BEGIN_DECLS
772
773 /* UDP header as specified by RFC 768, August 1980. */
774 #ifdef __FAVOR_BSD
775 -struct udphdr {
776 - u_int16_t uh_sport; /* source port */
777 - u_int16_t uh_dport; /* destination port */
778 - u_int16_t uh_ulen; /* udp length */
779 - u_int16_t uh_sum; /* udp checksum */
780 +
781 +struct udphdr
782 +{
783 + u_int16_t uh_sport; /* source port */
784 + u_int16_t uh_dport; /* destination port */
785 + u_int16_t uh_ulen; /* udp length */
786 + u_int16_t uh_sum; /* udp checksum */
787 };
788 +
789 #else
790
791 -struct udphdr {
792 - u_int16_t source;
793 - u_int16_t dest;
794 - u_int16_t len;
795 - u_int16_t check;
796 +struct udphdr
797 +{
798 + u_int16_t source;
799 + u_int16_t dest;
800 + u_int16_t len;
801 + u_int16_t check;
802 };
803 #endif
804
805 #define SOL_UDP 17 /* sockopt level for UDP */
806
807 -__END_DECLS
808 -
809 #endif /* netinet/udp.h */
810 --
811 1.6.4
812
813
814
815
816 1.1 src/patchsets/uclibc/0.9.28.3/09_all_uClibc-inotify.patch
817
818 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/09_all_uClibc-inotify.patch?rev=1.1&view=markup
819 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/09_all_uClibc-inotify.patch?rev=1.1&content-type=text/plain
820
821 Index: 09_all_uClibc-inotify.patch
822 ===================================================================
823 From 6cac9308787100bfcdf556bfc187a8136e2541c1 Mon Sep 17 00:00:00 2001
824 From: Mike Frysinger <vapier@g.o>
825 Date: Wed, 21 Jun 2006 00:07:34 +0000
826 Subject: [PATCH 1/1] Austin Morgan writes in #917: add support for inotify
827
828 ---
829 libc/sysdeps/linux/common/inotify.c | 24 ++++++++
830 libc/sysdeps/linux/common/sys/inotify.h | 92 +++++++++++++++++++++++++++++++
831 2 files changed, 116 insertions(+), 0 deletions(-)
832 create mode 100644 libc/sysdeps/linux/common/inotify.c
833 create mode 100644 libc/sysdeps/linux/common/sys/inotify.h
834
835 diff --git a/libc/sysdeps/linux/common/inotify.c b/libc/sysdeps/linux/common/inotify.c
836 new file mode 100644
837 index 0000000..87cf4d7
838 --- /dev/null
839 +++ libc/sysdeps/linux/common/inotify.c
840 @@ -0,0 +1,24 @@
841 +/* vi: set sw=4 ts=4: */
842 +/*
843 + * inotify interface for uClibc
844 + *
845 + * Copyright (C) 2006 Austin Morgan <admorgan@×××××××××××××××.net>
846 + * Copyright (C) 2006 by Erik Andersen <andersen@××××××××.org>
847 + *
848 + * Licensed under the LGPL v2.1, see the file COPYING.LIB in this tarball.
849 + */
850 +
851 +#include "syscalls.h"
852 +#include <sys/inotify.h>
853 +
854 +#ifdef __NR_inotify_init
855 +_syscall0(int, inotify_init);
856 +#endif
857 +
858 +#ifdef __NR_inotify_add_watch
859 +_syscall3(int, inotify_add_watch, int, fd, const char *, path, uint32_t, mask);
860 +#endif
861 +
862 +#ifdef __NR_inotify_rm_watch
863 +_syscall2(int, inotify_rm_watch, int, fd, uint32_t, wd);
864 +#endif
865 diff --git a/libc/sysdeps/linux/common/sys/inotify.h b/libc/sysdeps/linux/common/sys/inotify.h
866 new file mode 100644
867 index 0000000..0131db9
868 --- /dev/null
869 +++ libc/sysdeps/linux/common/sys/inotify.h
870 @@ -0,0 +1,92 @@
871 +/* Copyright (C) 2005, 2006 Free Software Foundation, Inc.
872 + This file is part of the GNU C Library.
873 +
874 + The GNU C Library is free software; you can redistribute it and/or
875 + modify it under the terms of the GNU Lesser General Public
876 + License as published by the Free Software Foundation; either
877 + version 2.1 of the License, or (at your option) any later version.
878 +
879 + The GNU C Library is distributed in the hope that it will be useful,
880 + but WITHOUT ANY WARRANTY; without even the implied warranty of
881 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
882 + Lesser General Public License for more details.
883 +
884 + You should have received a copy of the GNU Lesser General Public
885 + License along with the GNU C Library; if not, write to the Free
886 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
887 + 02111-1307 USA. */
888 +
889 +#ifndef _SYS_INOTIFY_H
890 +#define _SYS_INOTIFY_H 1
891 +
892 +#include <stdint.h>
893 +
894 +
895 +/* Structure describing an inotify event. */
896 +struct inotify_event
897 +{
898 + int wd; /* Watch descriptor. */
899 + uint32_t mask; /* Watch mask. */
900 + uint32_t cookie; /* Cookie to synchronize two events. */
901 + uint32_t len; /* Length (including NULs) of name. */
902 + char name __flexarr; /* Name. */
903 +};
904 +
905 +
906 +/* Supported events suitable for MASK parameter of INOTIFY_ADD_WATCH. */
907 +#define IN_ACCESS 0x00000001 /* File was accessed. */
908 +#define IN_MODIFY 0x00000002 /* File was modified. */
909 +#define IN_ATTRIB 0x00000004 /* Metadata changed. */
910 +#define IN_CLOSE_WRITE 0x00000008 /* Writtable file was closed. */
911 +#define IN_CLOSE_NOWRITE 0x00000010 /* Unwrittable file closed. */
912 +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
913 +#define IN_OPEN 0x00000020 /* File was opened. */
914 +#define IN_MOVED_FROM 0x00000040 /* File was moved from X. */
915 +#define IN_MOVED_TO 0x00000080 /* File was moved to Y. */
916 +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
917 +#define IN_CREATE 0x00000100 /* Subfile was created. */
918 +#define IN_DELETE 0x00000200 /* Subfile was deleted. */
919 +#define IN_DELETE_SELF 0x00000400 /* Self was deleted. */
920 +#define IN_MOVE_SELF 0x00000800 /* Self was moved. */
921 +
922 +/* Events sent by the kernel. */
923 +#define IN_UNMOUNT 0x00002000 /* Backing fs was unmounted. */
924 +#define IN_Q_OVERFLOW 0x00004000 /* Event queued overflowed. */
925 +#define IN_IGNORED 0x00008000 /* File was ignored. */
926 +
927 +/* Helper events. */
928 +#define IN_CLOSE (IN_CLOSE_WRITE | IN_CLOSE_NOWRITE) /* Close. */
929 +#define IN_MOVE (IN_MOVED_FROM | IN_MOVED_TO) /* Moves. */
930 +
931 +/* Special flags. */
932 +#define IN_ONLYDIR 0x01000000 /* Only watch the path if it is a
933 + directory. */
934 +#define IN_DONT_FOLLOW 0x02000000 /* Do not follow a sym link. */
935 +#define IN_MASK_ADD 0x20000000 /* Add to the mask of an already
936 + existing watch. */
937 +#define IN_ISDIR 0x40000000 /* Event occurred against dir. */
938 +#define IN_ONESHOT 0x80000000 /* Only send event once. */
939 +
940 +/* All events which a program can wait on. */
941 +#define IN_ALL_EVENTS (IN_ACCESS | IN_MODIFY | IN_ATTRIB | IN_CLOSE_WRITE \
942 + | IN_CLOSE_NOWRITE | IN_OPEN | IN_MOVED_FROM \
943 + | IN_MOVED_TO | IN_CREATE | IN_DELETE \
944 + | IN_DELETE_SELF | IN_MOVE_SELF)
945 +
946 +
947 +__BEGIN_DECLS
948 +
949 +/* Create and initialize inotify instance. */
950 +extern int inotify_init (void) __THROW;
951 +
952 +/* Add watch of object NAME to inotify instance FD. Notify about
953 + events specified by MASK. */
954 +extern int inotify_add_watch (int __fd, const char *__name, uint32_t __mask)
955 + __THROW;
956 +
957 +/* Remove the watch specified by WD from the inotify instance FD. */
958 +extern int inotify_rm_watch (int __fd, uint32_t __wd) __THROW;
959 +
960 +__END_DECLS
961 +
962 +#endif /* sys/inotify.h */
963 --
964 1.6.4
965
966
967
968
969 1.1 src/patchsets/uclibc/0.9.28.3/35_all_uClibc-gcc-4.3.patch
970
971 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/35_all_uClibc-gcc-4.3.patch?rev=1.1&view=markup
972 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/35_all_uClibc-gcc-4.3.patch?rev=1.1&content-type=text/plain
973
974 Index: 35_all_uClibc-gcc-4.3.patch
975 ===================================================================
976 From a6dfcd03425656208fc548c75f955016c26e8f71 Mon Sep 17 00:00:00 2001
977 From: Mike Frysinger <vapier@g.o>
978 Date: Fri, 21 Sep 2007 19:49:04 +0000
979 Subject: [PATCH] Jie Zhang writes:
980 GCC 4.3 will put fixed headers in a seperate include-fixed directory.
981 And I don't think that there are people who are still using the 'stupid'
982 GCC which cannot handle -iwithprefix, at least it works with gcc-3.3.x.
983
984 ---
985 Rules.mak | 4 +---
986 1 files changed, 1 insertions(+), 3 deletions(-)
987
988 diff --git a/Rules.mak b/Rules.mak
989 index a8655d2..1cfffc3 100644
990 --- a/Rules.mak
991 +++ b/Rules.mak
992 @@ -309,9 +309,7 @@ ifeq ($(UCLIBC_BUILD_NOW),y)
993 LDFLAGS+=-z now
994 endif
995
996 -# Sigh, some stupid versions of gcc can't seem to cope with '-iwithprefix include'
997 -#CFLAGS+=-iwithprefix include
998 -CFLAGS+=-isystem $(shell $(CC) -print-file-name=include)
999 +CFLAGS += -iwithprefix include-fixed -iwithprefix include
1000
1001 ifneq ($(DOASSERTS),y)
1002 CFLAGS += -DNDEBUG
1003 --
1004 1.6.4
1005
1006
1007
1008
1009 1.1 src/patchsets/uclibc/0.9.28.3/45_all_uClibc-ppoll.patch
1010
1011 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/45_all_uClibc-ppoll.patch?rev=1.1&view=markup
1012 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/45_all_uClibc-ppoll.patch?rev=1.1&content-type=text/plain
1013
1014 Index: 45_all_uClibc-ppoll.patch
1015 ===================================================================
1016 From f32fca94f05812dfb4ee3a399b78f89421a75403 Mon Sep 17 00:00:00 2001
1017 From: Mike Frysinger <vapier@g.o>
1018 Date: Wed, 28 Feb 2007 22:25:41 +0000
1019 Subject: [PATCH] add support for ppoll()
1020
1021 ---
1022 include/sys/poll.h | 28 +++++++++++++++++++--
1023 libc/sysdeps/linux/common/ppoll.c | 47 +++++++++++++++++++++++++++++++++++++
1024 2 files changed, 72 insertions(+), 3 deletions(-)
1025 create mode 100644 libc/sysdeps/linux/common/ppoll.c
1026
1027 diff --git a/include/sys/poll.h b/include/sys/poll.h
1028 index bf1c9e2..4085b78 100644
1029 --- a/include/sys/poll.h
1030 +++ b/include/sys/poll.h
1031 @@ -1,5 +1,5 @@
1032 /* Compatibility definitions for System V `poll' interface.
1033 - Copyright (C) 1994,96,97,98,99,2000,2001 Free Software Foundation, Inc.
1034 + Copyright (C) 1994,1996-2001,2004,2005,2006 Free Software Foundation, Inc.
1035 This file is part of the GNU C Library.
1036
1037 The GNU C Library is free software; you can redistribute it and/or
1038 @@ -24,6 +24,13 @@
1039
1040 /* Get the platform dependent bits of `poll'. */
1041 #include <bits/poll.h>
1042 +#ifdef __USE_GNU
1043 +/* Get the __sigset_t definition. */
1044 +# include <bits/sigset.h>
1045 +/* Get the timespec definition. */
1046 +# define __need_timespec
1047 +# include <time.h>
1048 +#endif
1049
1050
1051 /* Type used for the number of file descriptors. */
1052 @@ -44,8 +51,23 @@ __BEGIN_DECLS
1053 FDS. If TIMEOUT is nonzero and not -1, allow TIMEOUT milliseconds for
1054 an event to occur; if TIMEOUT is -1, block until an event occurs.
1055 Returns the number of file descriptors with events, zero if timed out,
1056 - or -1 for errors. */
1057 -extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout) __THROW;
1058 + or -1 for errors.
1059 +
1060 + This function is a cancellation point and therefore not marked with
1061 + __THROW. */
1062 +extern int poll (struct pollfd *__fds, nfds_t __nfds, int __timeout);
1063 +
1064 +#ifdef __USE_GNU
1065 +/* Like poll, but before waiting the threads signal mask is replaced
1066 + with that specified in the fourth parameter. For better usability,
1067 + the timeout value is specified using a TIMESPEC object.
1068 +
1069 + This function is a cancellation point and therefore not marked with
1070 + __THROW. */
1071 +extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
1072 + __const struct timespec *__timeout,
1073 + __const __sigset_t *__ss);
1074 +#endif
1075
1076 __END_DECLS
1077
1078 diff --git a/libc/sysdeps/linux/common/ppoll.c b/libc/sysdeps/linux/common/ppoll.c
1079 new file mode 100644
1080 index 0000000..e908ea8
1081 --- /dev/null
1082 +++ b/libc/sysdeps/linux/common/ppoll.c
1083 @@ -0,0 +1,47 @@
1084 +/* Copyright (C) 2006 Free Software Foundation, Inc.
1085 + This file is part of the GNU C Library.
1086 + Contributed by Ulrich Drepper <drepper@××××××.com>, 2006.
1087 +
1088 + The GNU C Library is free software; you can redistribute it and/or
1089 + modify it under the terms of the GNU Lesser General Public
1090 + License as published by the Free Software Foundation; either
1091 + version 2.1 of the License, or (at your option) any later version.
1092 +
1093 + The GNU C Library is distributed in the hope that it will be useful,
1094 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1095 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1096 + Lesser General Public License for more details.
1097 +
1098 + You should have received a copy of the GNU Lesser General Public
1099 + License along with the GNU C Library; if not, write to the Free
1100 + Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1101 + 02111-1307 USA. */
1102 +
1103 +#include <sys/syscall.h>
1104 +#include <sys/poll.h>
1105 +
1106 +#ifdef __NR_ppoll
1107 +
1108 +# define __NR___libc_ppoll __NR_ppoll
1109 +static inline
1110 +_syscall4(int, __libc_ppoll, struct pollfd *, fds,
1111 + nfds_t, nfds, const struct timespec *, timeout,
1112 + const sigset_t *, sigmask);
1113 +
1114 +int
1115 +ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
1116 + const sigset_t *sigmask)
1117 +{
1118 + /* The Linux kernel can in some situations update the timeout value.
1119 + We do not want that so use a local variable. */
1120 + struct timespec tval;
1121 + if (timeout != NULL)
1122 + {
1123 + tval = *timeout;
1124 + timeout = &tval;
1125 + }
1126 +
1127 + return __libc_ppoll(fds, nfds, timeout, sigmask);
1128 +}
1129 +
1130 +#endif
1131 --
1132 1.6.4
1133
1134
1135
1136
1137 1.1 src/patchsets/uclibc/0.9.28.3/46_all_uClibc-ppoll.patch
1138
1139 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/46_all_uClibc-ppoll.patch?rev=1.1&view=markup
1140 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/46_all_uClibc-ppoll.patch?rev=1.1&content-type=text/plain
1141
1142 Index: 46_all_uClibc-ppoll.patch
1143 ===================================================================
1144 From 3aa48f81c3f47e4db713e0ad133b56b70af6e2be Mon Sep 17 00:00:00 2001
1145 From: Khem Raj <kraj@××××××.com>
1146 Date: Thu, 1 Mar 2007 21:59:59 +0000
1147 Subject: [PATCH 3/4] Should be __sigset_t instead of sigset_t.
1148
1149 ---
1150 libc/sysdeps/linux/common/ppoll.c | 4 ++--
1151 1 files changed, 2 insertions(+), 2 deletions(-)
1152
1153 diff --git a/libc/sysdeps/linux/common/ppoll.c b/libc/sysdeps/linux/common/ppoll.c
1154 index e908ea8..3c4d341 100644
1155 --- a/libc/sysdeps/linux/common/ppoll.c
1156 +++ b/libc/sysdeps/linux/common/ppoll.c
1157 @@ -26,11 +26,11 @@
1158 static inline
1159 _syscall4(int, __libc_ppoll, struct pollfd *, fds,
1160 nfds_t, nfds, const struct timespec *, timeout,
1161 - const sigset_t *, sigmask);
1162 + const __sigset_t *, sigmask);
1163
1164 int
1165 ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
1166 - const sigset_t *sigmask)
1167 + const __sigset_t *sigmask)
1168 {
1169 /* The Linux kernel can in some situations update the timeout value.
1170 We do not want that so use a local variable. */
1171 --
1172 1.6.4
1173
1174
1175
1176
1177 1.1 src/patchsets/uclibc/0.9.28.3/47_all_uClibc-ppoll.patch
1178
1179 file : http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/47_all_uClibc-ppoll.patch?rev=1.1&view=markup
1180 plain: http://sources.gentoo.org/viewcvs.py/gentoo/src/patchsets/uclibc/0.9.28.3/47_all_uClibc-ppoll.patch?rev=1.1&content-type=text/plain
1181
1182 Index: 47_all_uClibc-ppoll.patch
1183 ===================================================================
1184 From 05caf5ca49717add04ec1251f504a0b2a635ea32 Mon Sep 17 00:00:00 2001
1185 From: Denis Vlasenko <vda.linux@××××××××××.com>
1186 Date: Wed, 28 Jan 2009 23:42:01 +0000
1187 Subject: [PATCH 4/4] fix ppoll. we forgot to pass 5th parameter to the syscall
1188
1189 ---
1190 libc/sysdeps/linux/common/ppoll.c | 28 +++++++++++++++-------------
1191 1 files changed, 15 insertions(+), 13 deletions(-)
1192
1193 diff --git a/libc/sysdeps/linux/common/ppoll.c b/libc/sysdeps/linux/common/ppoll.c
1194 index 3c4d341..9357d03 100644
1195 --- a/libc/sysdeps/linux/common/ppoll.c
1196 +++ b/libc/sysdeps/linux/common/ppoll.c
1197 @@ -17,6 +17,8 @@
1198 Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
1199 02111-1307 USA. */
1200
1201 +#include <signal.h>
1202 +#include <stdlib.h>
1203 #include <sys/syscall.h>
1204 #include <sys/poll.h>
1205
1206 @@ -24,24 +26,24 @@
1207
1208 # define __NR___libc_ppoll __NR_ppoll
1209 static inline
1210 -_syscall4(int, __libc_ppoll, struct pollfd *, fds,
1211 +_syscall5(int, __libc_ppoll, struct pollfd *, fds,
1212 nfds_t, nfds, const struct timespec *, timeout,
1213 - const __sigset_t *, sigmask);
1214 + const __sigset_t *, sigmask,
1215 + size_t, sigsetsize)
1216
1217 int
1218 -ppoll (struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
1219 +ppoll(struct pollfd *fds, nfds_t nfds, const struct timespec *timeout,
1220 const __sigset_t *sigmask)
1221 {
1222 - /* The Linux kernel can in some situations update the timeout value.
1223 - We do not want that so use a local variable. */
1224 - struct timespec tval;
1225 - if (timeout != NULL)
1226 - {
1227 - tval = *timeout;
1228 - timeout = &tval;
1229 - }
1230 -
1231 - return __libc_ppoll(fds, nfds, timeout, sigmask);
1232 + /* The Linux kernel can in some situations update the timeout value.
1233 + We do not want that so use a local variable. */
1234 + struct timespec tval;
1235 + if (timeout != NULL) {
1236 + tval = *timeout;
1237 + timeout = &tval;
1238 + }
1239 +
1240 + return __libc_ppoll(fds, nfds, timeout, sigmask, _NSIG / 8);
1241 }
1242
1243 #endif
1244 --
1245 1.6.4