summaryrefslogtreecommitdiff
path: root/packages/iputils/files/remove-glibc-headers.patch
blob: 0930acd65604ae8b5f53f9206dbbe97668fa067a (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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
We are not using the local glibc headers for now.
Remove them to keep them out of the way.

diff -durN orig/include-glibc/bits/socket.h new/include-glibc/bits/socket.h
--- orig/include-glibc/bits/socket.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/bits/socket.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,280 +0,0 @@
-/* System-specific socket constants and types.  Linux version.
-   Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#ifndef	_SOCKETBITS_H
-
-#define	_SOCKETBITS_H	1
-#include <features.h>
-
-#define	__need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-
-__BEGIN_DECLS
-
-/* Type for length arguments in socket calls.  */
-#ifndef __socklen_t_defined
-typedef unsigned int socklen_t;
-# define __socklen_t_defined
-#endif
-
-/* Types of sockets.  */
-enum __socket_type
-{
-#ifndef __mips__
-  SOCK_STREAM = 1,		/* Sequenced, reliable, connection-based
-				   byte streams.  */
-#define SOCK_STREAM SOCK_STREAM
-  SOCK_DGRAM = 2,		/* Connectionless, unreliable datagrams
-				   of fixed maximum length.  */
-#define SOCK_DGRAM SOCK_DGRAM
-#else
-  SOCK_STREAM = 2,		/* Sequenced, reliable, connection-based
-				   byte streams.  */
-#define SOCK_STREAM SOCK_STREAM
-  SOCK_DGRAM = 1,		/* Connectionless, unreliable datagrams
-				   of fixed maximum length.  */
-#define SOCK_DGRAM SOCK_DGRAM
-#endif
-  SOCK_RAW = 3,			/* Raw protocol interface.  */
-#define SOCK_RAW SOCK_RAW
-  SOCK_RDM = 4,			/* Reliably-delivered messages.  */
-#define SOCK_RDM SOCK_RDM
-  SOCK_SEQPACKET = 5,		/* Sequenced, reliable, connection-based,
-				   datagrams of fixed maximum length.  */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
-  SOCK_PACKET = 10		/* Linux specific way of getting packets
-				   at the dev level.  For writing rarp and
-				   other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-};
-
-/* Protocol families.  */
-#define	PF_UNSPEC	0	/* Unspecified.  */
-#define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
-#define	PF_UNIX		PF_LOCAL /* Old BSD name for PF_LOCAL.  */
-#define	PF_FILE		PF_LOCAL /* POSIX name for PF_LOCAL.  */
-#define	PF_INET		2	/* IP protocol family.  */
-#define	PF_AX25		3	/* Amateur Radio AX.25.  */
-#define	PF_IPX		4	/* Novell Internet Protocol.  */
-#define	PF_APPLETALK	5	/* Don't use this.  */
-#define	PF_NETROM	6	/* Amateur radio NetROM.  */
-#define	PF_BRIDGE	7	/* Multiprotocol bridge.  */
-#define	PF_AAL5		8	/* Reserved for Werner's ATM.  */
-#define	PF_X25		9	/* Reserved for X.25 project.  */
-#define	PF_INET6	10	/* IP version 6.  */
-#define	PF_ROSE		11	/* Amateur Radio X.25 PLP       */
-#define	PF_DECnet	12	/* Reserved for DECnet project  */
-#define	PF_NETBEUI	13	/* Reserved for 802.2LLC project*/
-#define	PF_SECURITY	14	/* Security callback pseudo AF */
-#define	PF_KEY		15	/* PF_KEY key management API */
-#define	PF_NETLINK	16
-#define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD */
-#define	PF_PACKET	17	/* Packet family                */
-#define	PF_MAX		32	/* For now.. */
-
-/* Address families.  */
-#define	AF_UNSPEC	PF_UNSPEC
-#define	AF_LOCAL	PF_LOCAL
-#define	AF_UNIX		PF_UNIX
-#define	AF_FILE		PF_FILE
-#define	AF_INET		PF_INET
-#define	AF_AX25		PF_AX25
-#define	AF_IPX		PF_IPX
-#define	AF_APPLETALK	PF_APPLETALK
-#define	AF_NETROM	PF_NETROM
-#define	AF_BRIDGE	PF_BRIDGE
-#define	AF_AAL5		PF_AAL5
-#define	AF_X25		PF_X25
-#define	AF_INET6	PF_INET6
-#define	AF_ROSE		PF_ROSE
-#define	AF_DECnet	PF_DECnet
-#define	AF_NETBEUI	PF_NETBEUI
-#define	AF_SECURITY	PF_SECURITY
-#define	pseudo_AF_KEY	pseudo_PF_KEY
-#define	AF_NETLINK	PF_NETLINK
-#define	AF_ROUTE	PF_ROUTE
-#define	AF_PACKET	PF_PACKET
-#define	AF_MAX		PF_MAX
-
-/* Socket level values.  Others are defined in the appropriate headers.
-
-   XXX These definitions also should go into the appropriate headers as
-   far as they are available.  */
-#define SOL_IPV6        41
-#define SOL_ICMPV6	58
-#define SOL_RAW		255
-#define SOL_AX25        257
-#define SOL_ATALK	258
-#define SOL_NETROM	259
-#define SOL_ROSE	260
-#define SOL_DECNET	261
-#define SOL_X25		262
-
-/* Maximum queue length specifiable by listen.  */
-#define SOMAXCONN	128
-
-/* Get the definition of the macro to define the common sockaddr members.  */
-#if __GLIBC_MINOR__  >= 1
-#include <bits/sockaddr.h>
-#else
-#include <sockaddrcom.h>
-#endif
-
-/* Structure describing a generic socket address.  */
-struct sockaddr
-  {
-    __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
-    char sa_data[14];		/* Address data.  */
-  };
-
-
-/* Bits in the FLAGS argument to `send', `recv', et al.  */
-enum
-  {
-    MSG_OOB		= 0x01,	/* Process out-of-band data.  */
-#define MSG_OOB		MSG_OOB
-    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
-#define MSG_PEEK	MSG_PEEK
-    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
-#define MSG_DONTROUTE	MSG_DONTROUTE
-    MSG_CTRUNC		= 0x08,	/* Control data lost before delivery.  */
-#define MSG_CTRUNC	MSG_CTRUNC
-    MSG_PROBE		= 0x10,
-#define MSG_PROBE	MSG_PROBE
-    MSG_TRUNC		= 0x20,
-#define MSG_TRUNC	MSG_TRUNC
-    MSG_DONTWAIT	= 0x40,
-#define MSG_DONTWAIT	MSG_DONTWAIT
-    MSG_WAITALL		= 0x100,
-#define MSG_WAITALL	MSG_WAITALL
-    MSG_CONFIRM		= 0x800,
-#define MSG_CONFIRM	MSG_CONFIRM
-    MSG_ERRQUEUE	= 0x2000,
-#define MSG_ERRQUEUE	MSG_ERRQUEUE
-    MSG_NOSIGNAL	= 0x4000,
-#define MSG_NOSIGNAL	MSG_NOSIGNAL
-  };
-
-/* Structure describing messages sent by
-   `sendmsg' and received by `recvmsg'.  */
-struct msghdr
-  {
-    __ptr_t msg_name;		/* Address to send to/receive from.  */
-    socklen_t msg_namelen;	/* Length of address data.  */
-
-    struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
-    size_t msg_iovlen;		/* Number of elements in the vector.  */
-
-    __ptr_t msg_control;	/* Ancillary data (eg BSD filedesc passing). */
-    size_t msg_controllen;	/* Ancillary data buffer length.  */
-
-    int msg_flags;		/* Flags on received message.  */
-  };
-
-/* Structure used for storage of ancillary data object information.  */
-struct cmsghdr
-  {
-    size_t cmsg_len;		/* Length of data in cmsg_data plus length
-				   of cmsghdr structure.  */
-    int cmsg_level;		/* Originating protocol.  */
-    int cmsg_type;		/* Protocol specific type.  */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
-    unsigned char __cmsg_data[0]; /* Ancillary data.  */
-#endif
-  };
-
-/* Ancillary data object manipulation macros.  */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
-#else
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-#endif
-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) \
-  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
-   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
-#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
-#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
-#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
-
-
-#ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
-#endif
-extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
-					   struct cmsghdr *__cmsg));
-_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
-{
-  if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
-	  /* The kernel header does this so there may be a reason.  */
-	  return NULL;
-
-  __cmsg = (struct cmsghdr *) 
-	  ((unsigned char *) __cmsg + CMSG_ALIGN(__cmsg->cmsg_len));  
-
-  if ( (unsigned char *) (__cmsg + 1) >= 
-	   (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)
-	  /* No more entries.  */
-	  return NULL;
-  return __cmsg;
-}
-
-/* Socket level message types.  This must match the definitions in
-   <linux/socket.h>.  */
-enum
-  {
-    SCM_RIGHTS = 0x01,         /* Data array contains access rights.  */
-#define SCM_RIGHTS SCM_RIGHTS
-    SCM_CREDENTIALS = 0x02,  /* Data array is `struct ucred'.  */
-#define SCM_CREDENTIALS SCM_CREDENTIALS
-  };
-
-
-
-/* Get socket manipulation related informations from kernel headers.  */
-#ifdef THIS_IS_CRAP
-#ifndef _LINUX_TYPES_H
-# define _LINUX_TYPES_H
-#endif
-#endif
-
-#include <asm/socket.h>
-#include <asm/types.h>
-
-struct ucred
-{
-	__u32	pid;
-	__u32	uid;
-	__u32	gid;
-};
-
-
-/* Structure used to manipulate the SO_LINGER option.  */
-struct linger
-  {
-    int l_onoff;		/* Nonzero to linger on close.  */
-    int l_linger;		/* Time to linger.  */
-  };
-
-__END_DECLS
-
-#endif /* socketbits.h */
diff -durN orig/include-glibc/bits/sockunion.h new/include-glibc/bits/sockunion.h
--- orig/include-glibc/bits/sockunion.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/bits/sockunion.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,25 +0,0 @@
-
-/* I cannot describe, how I laughed, when saw, that now sys/socket.h
-   includes ALL OF networking include files. 8)8)8)
-
-   Bravo! Aah, they forgot sockaddr_ll, sockaddr_pkt and sockaddr_nl...
-   Not a big problem, we only start the way to single UNIVERSAL include file:
-
-   #include <GNU-Gnu_is_Not_Unix.h>.
-
-   Jokes apart, it is full crap. Removed.
-   --ANK
-
- */
-
-/* Union of all sockaddr types (required by IPv6 Basic API).  This is
-   somewhat evil.  */
-/* 8)8) Well, ipngwg really does strange things sometimes, but
-   not in such extent! It is removed long ago --ANK
- */
-
-union sockaddr_union
-  {
-    struct sockaddr sa;
-    char __maxsize[128];
-  };
diff -durN orig/include-glibc/glibc-bugs.h new/include-glibc/glibc-bugs.h
--- orig/include-glibc/glibc-bugs.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/glibc-bugs.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,20 +0,0 @@
-#ifndef __GLIBC_BUGS_H__
-#define __GLIBC_BUGS_H__ 1
-
-#include <features.h>
-#include <sys/types.h>
-
-#if defined(__GLIBC__) && __GLIBC__ >= 2
-
-#ifndef __KERNEL_STRICT_NAMES
-#define __KERNEL_STRICT_NAMES 1
-#endif
-
-#include <linux/types.h>
-
-typedef __u16 in_port_t;
-typedef __u32 in_addr_t;
-
-#endif
-
-#endif
diff -durN orig/include-glibc/netinet/in.h new/include-glibc/netinet/in.h
--- orig/include-glibc/netinet/in.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/netinet/in.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,11 +0,0 @@
-#ifndef	_NETINET_IN_H
-#define	_NETINET_IN_H	1
-
-#include "glibc-bugs.h"
-#include <sys/socket.h>
-#include <sys/types.h>
-#include <linux/in.h>
-
-#define SOL_IP	0
-
-#endif	/* netinet/in.h */
diff -durN orig/include-glibc/netinet/ip.h new/include-glibc/netinet/ip.h
--- orig/include-glibc/netinet/ip.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/netinet/ip.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,98 +0,0 @@
-#ifndef __NETINET_IP_H
-#define __NETINET_IP_H 1
-
-#include <glibc-bugs.h>
-#include <netinet/in.h>
-
-#include <linux/ip.h>
-
-#ifdef __USE_BSD
-/*
- * Copyright (c) 1982, 1986, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)ip.h	8.1 (Berkeley) 6/10/93
- */
-
-/*
- * Definitions for internet protocol version 4.
- * Per RFC 791, September 1981.
- */
-
-/*
- * Structure of an internet header, naked of options.
- */
-struct ip
-  {
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    u_int8_t ip_hl:4;			/* header length */
-    u_int8_t ip_v:4;			/* version */
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
-    u_int8_t ip_v:4;			/* version */
-    u_int8_t ip_hl:4;			/* header length */
-#endif
-    u_int8_t ip_tos;			/* type of service */
-    u_short ip_len;			/* total length */
-    u_short ip_id;			/* identification */
-    u_short ip_off;			/* fragment offset field */
-#define	IP_RF 0x8000			/* reserved fragment flag */
-#define	IP_DF 0x4000			/* dont fragment flag */
-#define	IP_MF 0x2000			/* more fragments flag */
-#define	IP_OFFMASK 0x1fff		/* mask for fragmenting bits */
-    u_int8_t ip_ttl;			/* time to live */
-    u_int8_t ip_p;			/* protocol */
-    u_short ip_sum;			/* checksum */
-    struct in_addr ip_src, ip_dst;	/* source and dest address */
-  };
-
-/*
- * Time stamp option structure.
- */
-struct ip_timestamp
-  {
-    u_int8_t ipt_code;			/* IPOPT_TS */
-    u_int8_t ipt_len;			/* size of structure (variable) */
-    u_int8_t ipt_ptr;			/* index of current entry */
-#if __BYTE_ORDER == __LITTLE_ENDIAN
-    u_int8_t ipt_flg:4;			/* flags, see below */
-    u_int8_t ipt_oflw:4;		/* overflow counter */
-#endif
-#if __BYTE_ORDER == __BIG_ENDIAN
-    u_int8_t ipt_oflw:4;		/* overflow counter */
-    u_int8_t ipt_flg:4;			/* flags, see below */
-#endif
-    u_int32_t data[9];
-  };
-#endif /* __USE_BSD */
-
-
-#endif /* netinet/ip.h */
diff -durN orig/include-glibc/netinet/ip_icmp.h new/include-glibc/netinet/ip_icmp.h
--- orig/include-glibc/netinet/ip_icmp.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/netinet/ip_icmp.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,199 +0,0 @@
-#ifndef __NETINET_IP_ICMP_H
-#define __NETINET_IP_ICMP_H    1
-
-
-#include <asm/types.h>
-#include <linux/icmp.h>
-
-#ifdef __USE_BSD
-/*
- * Copyright (c) 1982, 1986, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- *
- *	@(#)ip_icmp.h	8.1 (Berkeley) 6/10/93
- */
-
-#include <netinet/in.h>
-#include <netinet/ip.h>
-
-/*
- * Internal of an ICMP Router Advertisement
- */
-struct icmp_ra_addr
-{
-  u_int32_t ira_addr;
-  u_int32_t ira_preference;
-};
-
-struct icmp
-{
-  u_int8_t  icmp_type;	/* type of message, see below */
-  u_int8_t  icmp_code;	/* type sub code */
-  u_int16_t icmp_cksum;	/* ones complement checksum of struct */
-  union
-  {
-    u_char ih_pptr;		/* ICMP_PARAMPROB */
-    struct in_addr ih_gwaddr;	/* gateway address */
-    struct ih_idseq		/* echo datagram */
-    {
-      u_int16_t icd_id;
-      u_int16_t icd_seq;
-    } ih_idseq;
-    u_int32_t ih_void;
-
-    /* ICMP_UNREACH_NEEDFRAG -- Path MTU Discovery (RFC1191) */
-    struct ih_pmtu
-    {
-      u_int16_t ipm_void;
-      u_int16_t ipm_nextmtu;
-    } ih_pmtu;
-
-    struct ih_rtradv
-    {
-      u_int8_t irt_num_addrs;
-      u_int8_t irt_wpa;
-      u_int16_t irt_lifetime;
-    } ih_rtradv;
-  } icmp_hun;
-#define	icmp_pptr	icmp_hun.ih_pptr
-#define	icmp_gwaddr	icmp_hun.ih_gwaddr
-#define	icmp_id		icmp_hun.ih_idseq.icd_id
-#define	icmp_seq	icmp_hun.ih_idseq.icd_seq
-#define	icmp_void	icmp_hun.ih_void
-#define	icmp_pmvoid	icmp_hun.ih_pmtu.ipm_void
-#define	icmp_nextmtu	icmp_hun.ih_pmtu.ipm_nextmtu
-#define	icmp_num_addrs	icmp_hun.ih_rtradv.irt_num_addrs
-#define	icmp_wpa	icmp_hun.ih_rtradv.irt_wpa
-#define	icmp_lifetime	icmp_hun.ih_rtradv.irt_lifetime
-  union
-  {
-    struct
-    {
-      u_int32_t its_otime;
-      u_int32_t its_rtime;
-      u_int32_t its_ttime;
-    } id_ts;
-    struct
-    {
-      struct ip idi_ip;
-      /* options and then 64 bits of data */
-    } id_ip;
-    struct icmp_ra_addr id_radv;
-    u_int32_t   id_mask;
-    u_int8_t    id_data[1];
-  } icmp_dun;
-#define	icmp_otime	icmp_dun.id_ts.its_otime
-#define	icmp_rtime	icmp_dun.id_ts.its_rtime
-#define	icmp_ttime	icmp_dun.id_ts.its_ttime
-#define	icmp_ip		icmp_dun.id_ip.idi_ip
-#define	icmp_radv	icmp_dun.id_radv
-#define	icmp_mask	icmp_dun.id_mask
-#define	icmp_data	icmp_dun.id_data
-};
-
-/*
- * Lower bounds on packet lengths for various types.
- * For the error advice packets must first insure that the
- * packet is large enough to contain the returned ip header.
- * Only then can we do the check to see if 64 bits of packet
- * data have been returned, since we need to check the returned
- * ip header length.
- */
-#define	ICMP_MINLEN	8				/* abs minimum */
-#define	ICMP_TSLEN	(8 + 3 * sizeof (n_time))	/* timestamp */
-#define	ICMP_MASKLEN	12				/* address mask */
-#define	ICMP_ADVLENMIN	(8 + sizeof (struct ip) + 8)	/* min */
-#ifndef _IP_VHL
-#define	ICMP_ADVLEN(p)	(8 + ((p)->icmp_ip.ip_hl << 2) + 8)
-	/* N.B.: must separately check that ip_hl >= 5 */
-#else
-#define	ICMP_ADVLEN(p)	(8 + (IP_VHL_HL((p)->icmp_ip.ip_vhl) << 2) + 8)
-	/* N.B.: must separately check that header length >= 5 */
-#endif
-
-/* Definition of type and code fields. */
-/* defined above: ICMP_ECHOREPLY, ICMP_REDIRECT, ICMP_ECHO */
-#define	ICMP_UNREACH		3		/* dest unreachable, codes: */
-#define	ICMP_SOURCEQUENCH	4		/* packet lost, slow down */
-#define	ICMP_ROUTERADVERT	9		/* router advertisement */
-#define	ICMP_ROUTERSOLICIT	10		/* router solicitation */
-#define	ICMP_TIMXCEED		11		/* time exceeded, code: */
-#define	ICMP_PARAMPROB		12		/* ip header bad */
-#define	ICMP_TSTAMP		13		/* timestamp request */
-#define	ICMP_TSTAMPREPLY	14		/* timestamp reply */
-#define	ICMP_IREQ		15		/* information request */
-#define	ICMP_IREQREPLY		16		/* information reply */
-#define	ICMP_MASKREQ		17		/* address mask request */
-#define	ICMP_MASKREPLY		18		/* address mask reply */
-
-#define	ICMP_MAXTYPE		18
-
-/* UNREACH codes */
-#define	ICMP_UNREACH_NET	        0	/* bad net */
-#define	ICMP_UNREACH_HOST	        1	/* bad host */
-#define	ICMP_UNREACH_PROTOCOL	        2	/* bad protocol */
-#define	ICMP_UNREACH_PORT	        3	/* bad port */
-#define	ICMP_UNREACH_NEEDFRAG	        4	/* IP_DF caused drop */
-#define	ICMP_UNREACH_SRCFAIL	        5	/* src route failed */
-#define	ICMP_UNREACH_NET_UNKNOWN        6	/* unknown net */
-#define	ICMP_UNREACH_HOST_UNKNOWN       7	/* unknown host */
-#define	ICMP_UNREACH_ISOLATED	        8	/* src host isolated */
-#define	ICMP_UNREACH_NET_PROHIB	        9	/* net denied */
-#define	ICMP_UNREACH_HOST_PROHIB        10	/* host denied */
-#define	ICMP_UNREACH_TOSNET	        11	/* bad tos for net */
-#define	ICMP_UNREACH_TOSHOST	        12	/* bad tos for host */
-#define	ICMP_UNREACH_FILTER_PROHIB      13	/* admin prohib */
-#define	ICMP_UNREACH_HOST_PRECEDENCE    14	/* host prec vio. */
-#define	ICMP_UNREACH_PRECEDENCE_CUTOFF  15	/* prec cutoff */
-
-/* REDIRECT codes */
-#define	ICMP_REDIRECT_NET	0		/* for network */
-#define	ICMP_REDIRECT_HOST	1		/* for host */
-#define	ICMP_REDIRECT_TOSNET	2		/* for tos and net */
-#define	ICMP_REDIRECT_TOSHOST	3		/* for tos and host */
-
-/* TIMEXCEED codes */
-#define	ICMP_TIMXCEED_INTRANS	0		/* ttl==0 in transit */
-#define	ICMP_TIMXCEED_REASS	1		/* ttl==0 in reass */
-
-/* PARAMPROB code */
-#define	ICMP_PARAMPROB_OPTABSENT 1		/* req. opt. absent */
-
-#define	ICMP_INFOTYPE(type) \
-	((type) == ICMP_ECHOREPLY || (type) == ICMP_ECHO || \
-	(type) == ICMP_ROUTERADVERT || (type) == ICMP_ROUTERSOLICIT || \
-	(type) == ICMP_TSTAMP || (type) == ICMP_TSTAMPREPLY || \
-	(type) == ICMP_IREQ || (type) == ICMP_IREQREPLY || \
-	(type) == ICMP_MASKREQ || (type) == ICMP_MASKREPLY)
-
-#endif /* __USE_BSD */
-
-#endif /* netinet/ip_icmp.h */
diff -durN orig/include-glibc/socketbits.h new/include-glibc/socketbits.h
--- orig/include-glibc/socketbits.h	2005-11-14 22:37:26.000000000 +1100
+++ new/include-glibc/socketbits.h	1970-01-01 10:00:00.000000000 +1000
@@ -1,280 +0,0 @@
-/* System-specific socket constants and types.  Linux version.
-   Copyright (C) 1991, 92, 94, 95, 96, 97, 98 Free Software Foundation, Inc.
-   This file is part of the GNU C Library.
-
-   The GNU C Library is free software; you can redistribute it and/or
-   modify it under the terms of the GNU Library General Public License as
-   published by the Free Software Foundation; either version 2 of the
-   License, or (at your option) any later version.
-
-   The GNU C Library is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-   Library General Public License for more details.
-
-   You should have received a copy of the GNU Library General Public
-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
-   Boston, MA 02111-1307, USA.  */
-
-#ifndef	_SOCKETBITS_H
-
-#define	_SOCKETBITS_H	1
-#include <features.h>
-
-#define	__need_size_t
-#define __need_NULL
-#include <stddef.h>
-
-
-__BEGIN_DECLS
-
-/* Type for length arguments in socket calls.  */
-#ifndef __socklen_t_defined
-typedef unsigned int socklen_t;
-# define __socklen_t_defined
-#endif
-
-/* Types of sockets.  */
-enum __socket_type
-{
-#ifndef __mips__
-  SOCK_STREAM = 1,		/* Sequenced, reliable, connection-based
-				   byte streams.  */
-#define SOCK_STREAM SOCK_STREAM
-  SOCK_DGRAM = 2,		/* Connectionless, unreliable datagrams
-				   of fixed maximum length.  */
-#define SOCK_DGRAM SOCK_DGRAM
-#else
-  SOCK_STREAM = 2,		/* Sequenced, reliable, connection-based
-				   byte streams.  */
-#define SOCK_STREAM SOCK_STREAM
-  SOCK_DGRAM = 1,		/* Connectionless, unreliable datagrams
-				   of fixed maximum length.  */
-#define SOCK_DGRAM SOCK_DGRAM
-#endif
-  SOCK_RAW = 3,			/* Raw protocol interface.  */
-#define SOCK_RAW SOCK_RAW
-  SOCK_RDM = 4,			/* Reliably-delivered messages.  */
-#define SOCK_RDM SOCK_RDM
-  SOCK_SEQPACKET = 5,		/* Sequenced, reliable, connection-based,
-				   datagrams of fixed maximum length.  */
-#define SOCK_SEQPACKET SOCK_SEQPACKET
-  SOCK_PACKET = 10		/* Linux specific way of getting packets
-				   at the dev level.  For writing rarp and
-				   other similar things on the user level. */
-#define SOCK_PACKET SOCK_PACKET
-};
-
-/* Protocol families.  */
-#define	PF_UNSPEC	0	/* Unspecified.  */
-#define	PF_LOCAL	1	/* Local to host (pipes and file-domain).  */
-#define	PF_UNIX		PF_LOCAL /* Old BSD name for PF_LOCAL.  */
-#define	PF_FILE		PF_LOCAL /* POSIX name for PF_LOCAL.  */
-#define	PF_INET		2	/* IP protocol family.  */
-#define	PF_AX25		3	/* Amateur Radio AX.25.  */
-#define	PF_IPX		4	/* Novell Internet Protocol.  */
-#define	PF_APPLETALK	5	/* Don't use this.  */
-#define	PF_NETROM	6	/* Amateur radio NetROM.  */
-#define	PF_BRIDGE	7	/* Multiprotocol bridge.  */
-#define	PF_AAL5		8	/* Reserved for Werner's ATM.  */
-#define	PF_X25		9	/* Reserved for X.25 project.  */
-#define	PF_INET6	10	/* IP version 6.  */
-#define	PF_ROSE		11	/* Amateur Radio X.25 PLP       */
-#define	PF_DECnet	12	/* Reserved for DECnet project  */
-#define	PF_NETBEUI	13	/* Reserved for 802.2LLC project*/
-#define	PF_SECURITY	14	/* Security callback pseudo AF */
-#define	PF_KEY		15	/* PF_KEY key management API */
-#define	PF_NETLINK	16
-#define	PF_ROUTE	PF_NETLINK /* Alias to emulate 4.4BSD */
-#define	PF_PACKET	17	/* Packet family                */
-#define	PF_MAX		32	/* For now.. */
-
-/* Address families.  */
-#define	AF_UNSPEC	PF_UNSPEC
-#define	AF_LOCAL	PF_LOCAL
-#define	AF_UNIX		PF_UNIX
-#define	AF_FILE		PF_FILE
-#define	AF_INET		PF_INET
-#define	AF_AX25		PF_AX25
-#define	AF_IPX		PF_IPX
-#define	AF_APPLETALK	PF_APPLETALK
-#define	AF_NETROM	PF_NETROM
-#define	AF_BRIDGE	PF_BRIDGE
-#define	AF_AAL5		PF_AAL5
-#define	AF_X25		PF_X25
-#define	AF_INET6	PF_INET6
-#define	AF_ROSE		PF_ROSE
-#define	AF_DECnet	PF_DECnet
-#define	AF_NETBEUI	PF_NETBEUI
-#define	AF_SECURITY	PF_SECURITY
-#define	pseudo_AF_KEY	pseudo_PF_KEY
-#define	AF_NETLINK	PF_NETLINK
-#define	AF_ROUTE	PF_ROUTE
-#define	AF_PACKET	PF_PACKET
-#define	AF_MAX		PF_MAX
-
-/* Socket level values.  Others are defined in the appropriate headers.
-
-   XXX These definitions also should go into the appropriate headers as
-   far as they are available.  */
-#define SOL_IPV6        41
-#define SOL_ICMPV6	58
-#define SOL_RAW		255
-#define SOL_AX25        257
-#define SOL_ATALK	258
-#define SOL_NETROM	259
-#define SOL_ROSE	260
-#define SOL_DECNET	261
-#define SOL_X25		262
-
-/* Maximum queue length specifiable by listen.  */
-#define SOMAXCONN	128
-
-/* Get the definition of the macro to define the common sockaddr members.  */
-#if __GLIBC_MINOR__  >= 1
-#include <bits/sockaddr.h>
-#else
-#include <sockaddrcom.h>
-#endif
-
-/* Structure describing a generic socket address.  */
-struct sockaddr
-  {
-    __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
-    char sa_data[14];		/* Address data.  */
-  };
-
-
-/* Bits in the FLAGS argument to `send', `recv', et al.  */
-enum
-  {
-    MSG_OOB		= 0x01,	/* Process out-of-band data.  */
-#define MSG_OOB		MSG_OOB
-    MSG_PEEK		= 0x02,	/* Peek at incoming messages.  */
-#define MSG_PEEK	MSG_PEEK
-    MSG_DONTROUTE	= 0x04,	/* Don't use local routing.  */
-#define MSG_DONTROUTE	MSG_DONTROUTE
-    MSG_CTRUNC		= 0x08,	/* Control data lost before delivery.  */
-#define MSG_CTRUNC	MSG_CTRUNC
-    MSG_PROBE		= 0x10,
-#define MSG_PROBE	MSG_PROBE
-    MSG_TRUNC		= 0x20,
-#define MSG_TRUNC	MSG_TRUNC
-    MSG_DONTWAIT	= 0x40,
-#define MSG_DONTWAIT	MSG_DONTWAIT
-    MSG_WAITALL		= 0x100,
-#define MSG_WAITALL	MSG_WAITALL
-    MSG_CONFIRM		= 0x800,
-#define MSG_CONFIRM	MSG_CONFIRM
-    MSG_ERRQUEUE	= 0x2000,
-#define MSG_ERRQUEUE	MSG_ERRQUEUE
-    MSG_NOSIGNAL	= 0x4000,
-#define MSG_NOSIGNAL	MSG_NOSIGNAL
-  };
-
-/* Structure describing messages sent by
-   `sendmsg' and received by `recvmsg'.  */
-struct msghdr
-  {
-    __ptr_t msg_name;		/* Address to send to/receive from.  */
-    socklen_t msg_namelen;	/* Length of address data.  */
-
-    struct iovec *msg_iov;	/* Vector of data to send/receive into.  */
-    size_t msg_iovlen;		/* Number of elements in the vector.  */
-
-    __ptr_t msg_control;	/* Ancillary data (eg BSD filedesc passing). */
-    size_t msg_controllen;	/* Ancillary data buffer length.  */
-
-    int msg_flags;		/* Flags on received message.  */
-  };
-
-/* Structure used for storage of ancillary data object information.  */
-struct cmsghdr
-  {
-    size_t cmsg_len;		/* Length of data in cmsg_data plus length
-				   of cmsghdr structure.  */
-    int cmsg_level;		/* Originating protocol.  */
-    int cmsg_type;		/* Protocol specific type.  */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
-    unsigned char __cmsg_data[0]; /* Ancillary data.  */
-#endif
-  };
-
-/* Ancillary data object manipulation macros.  */
-#if !defined __STRICT_ANSI__ && defined __GNUC__ && __GNUC__ >= 2
-# define CMSG_DATA(cmsg) ((cmsg)->__cmsg_data)
-#else
-# define CMSG_DATA(cmsg) ((unsigned char *) ((struct cmsghdr *) (cmsg) + 1))
-#endif
-#define CMSG_NXTHDR(mhdr, cmsg) __cmsg_nxthdr (mhdr, cmsg)
-#define CMSG_FIRSTHDR(mhdr) \
-  ((size_t) (mhdr)->msg_controllen >= sizeof (struct cmsghdr)		      \
-   ? (struct cmsghdr *) (mhdr)->msg_control : (struct cmsghdr *) NULL)
-#define CMSG_ALIGN(len) ( ((len)+sizeof(long)-1) & ~(sizeof(long)-1) )
-#define CMSG_SPACE(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + CMSG_ALIGN(len))
-#define CMSG_LEN(len) (CMSG_ALIGN(sizeof(struct cmsghdr)) + (len))
-
-
-#ifndef _EXTERN_INLINE
-# define _EXTERN_INLINE extern __inline
-#endif
-extern struct cmsghdr *__cmsg_nxthdr __P ((struct msghdr *__mhdr,
-					   struct cmsghdr *__cmsg));
-_EXTERN_INLINE struct cmsghdr *
-__cmsg_nxthdr (struct msghdr *__mhdr, struct cmsghdr *__cmsg)
-{
-  if ((size_t) __cmsg->cmsg_len < sizeof (struct cmsghdr))
-	  /* The kernel header does this so there may be a reason.  */
-	  return NULL;
-
-  __cmsg = (struct cmsghdr *) 
-	  ((unsigned char *) __cmsg + CMSG_ALIGN(__cmsg->cmsg_len));  
-
-  if ( (unsigned char *) (__cmsg + 1) >= 
-	   (unsigned char *) __mhdr->msg_control + __mhdr->msg_controllen)
-	  /* No more entries.  */
-	  return NULL;
-  return __cmsg;
-}
-
-/* Socket level message types.  This must match the definitions in
-   <linux/socket.h>.  */
-enum
-  {
-    SCM_RIGHTS = 0x01,         /* Data array contains access rights.  */
-#define SCM_RIGHTS SCM_RIGHTS
-    SCM_CREDENTIALS = 0x02,  /* Data array is `struct ucred'.  */
-#define SCM_CREDENTIALS SCM_CREDENTIALS
-  };
-
-
-
-/* Get socket manipulation related informations from kernel headers.  */
-#ifdef THIS_IS_CRAP
-#ifndef _LINUX_TYPES_H
-# define _LINUX_TYPES_H
-#endif
-#endif
-
-#include <asm/socket.h>
-#include <asm/types.h>
-
-struct ucred
-{
-	__u32	pid;
-	__u32	uid;
-	__u32	gid;
-};
-
-
-/* Structure used to manipulate the SO_LINGER option.  */
-struct linger
-  {
-    int l_onoff;		/* Nonzero to linger on close.  */
-    int l_linger;		/* Time to linger.  */
-  };
-
-__END_DECLS
-
-#endif /* socketbits.h */