r3989 - in glibc-package/trunk/debian: . patches/kfreebsd
Author: ps-guest
Date: 2009-11-19 11:17:21 +0000 (Thu, 19 Nov 2009)
New Revision: 3989
Modified:
glibc-package/trunk/debian/changelog
glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
Log:
kfreebsd/local-sysdeps.diff: update to revision 2854 (from glibc-bsd).
Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog 2009-11-19 10:51:22 UTC (rev 3988)
+++ glibc-package/trunk/debian/changelog 2009-11-19 11:17:21 UTC (rev 3989)
@@ -7,7 +7,6 @@
- remove patches/powerpc/cvs-readahead.diff (merged).
- remove patches/any/submitted-libgcc_s.so.diff (merged).
- remove patches/any/cvs-preadv-pwritev.diff (merged).
- * kfreebsd/local-sysdeps.diff: update to revision 2847 (from glibc-bsd).
* patches/ia64/cvs-memchr.diff: new patch from upstream replacing
patches/ia64/submitted-memchr.diff.
* patches/any/cvs-malloc-check.diff: new patch from upstream to fix bugs
@@ -22,6 +21,9 @@
[ Carlos O'Donell]
* patches/hppa/local-stack-grows-up.diff: new version.
+ [ Petr Salinger]
+ * kfreebsd/local-sysdeps.diff: update to revision 2854 (from glibc-bsd).
+
-- Aurelien Jarno <aurel32@debian.org> Thu, 19 Nov 2009 11:50:25 +0100
eglibc (2.10.1-7) unstable; urgency=low
Modified: glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff
===================================================================
--- glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-11-19 10:51:22 UTC (rev 3988)
+++ glibc-package/trunk/debian/patches/kfreebsd/local-sysdeps.diff 2009-11-19 11:17:21 UTC (rev 3989)
@@ -6736,98 +6736,6 @@
+# endif /* struct timeval */
+#endif /* need timeval */
--- /dev/null
-+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/time.h~
-@@ -0,0 +1,89 @@
-+/* System-dependent timing definitions. FreeBSD version.
-+ Copyright (C) 1996-1997, 1999, 2000, 2002 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 Lesser General Public
-+ License as published by the Free Software Foundation; either
-+ version 2.1 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
-+ Lesser General Public License for more details.
-+
-+ You should have received a copy of the GNU Lesser General Public
-+ License along with the GNU C Library; if not, write to the Free
-+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-+ 02111-1307 USA. */
-+
-+/*
-+ * Never include this file directly; use <time.h> instead.
-+ */
-+
-+#ifndef __need_timeval
-+# ifndef _BITS_TIME_H
-+# define _BITS_TIME_H 1
-+
-+/* ISO/IEC 9899:1990 7.12.1: <time.h>
-+ The macro `CLOCKS_PER_SEC' is the number per second of the value
-+ returned by the `clock' function. */
-+/* CAE XSH, Issue 4, Version 2: <time.h>
-+ The value of CLOCKS_PER_SEC is required to be 1 million on all
-+ XSI-conformant systems. */
-+# define CLOCKS_PER_SEC 1000000l
-+
-+# if !defined __STRICT_ANSI__ && !defined __USE_XOPEN2K
-+/* Even though CLOCKS_PER_SEC has such a strange value CLK_TCK
-+ presents the real value for clock ticks per second for the system. */
-+# define CLK_TCK 128
-+# endif
-+
-+# ifdef __USE_POSIX199309
-+/* Identifier for system-wide realtime clock. */
-+# define CLOCK_REALTIME 0
-+/* High-resolution timer from the CPU. */
-+# define CLOCK_PROCESS_CPUTIME_ID 2
-+/* Thread-specific CPU-time clock. */
-+# define CLOCK_THREAD_CPUTIME_ID 3
-+/* Monotonic system-wide clock. */
-+# define CLOCK_MONOTONIC 4
-+/* These are BSD specific clocks. */
-+# ifdef __USE_BSD
-+# define CLOCK_VIRTUAL 1
-+# define CLOCK_PROF 2
-+# endif
-+
-+/* Flag to indicate time is absolute. */
-+# define TIMER_ABSTIME 1
-+# endif
-+
-+
-+/* Getkerninfo clock information structure */
-+struct clockinfo
-+ {
-+ int hz; /* clock frequency */
-+ int tick; /* micro-seconds per hz tick */
-+ int spare;
-+ int stathz; /* statistics clock frequency */
-+ int profhz; /* profiling clock frequency */
-+ };
-+
-+# endif /* bits/time.h */
-+#endif
-+
-+#ifdef __need_timeval
-+# undef __need_timeval
-+# ifndef _STRUCT_TIMEVAL
-+# define _STRUCT_TIMEVAL 1
-+# include <bits/types.h>
-+
-+/* A time value that is accurate to the nearest
-+ microsecond but also has a range of years. */
-+struct timeval
-+ {
-+ __time_t tv_sec; /* Seconds. */
-+ __suseconds_t tv_usec; /* Microseconds. */
-+ };
-+# endif /* struct timeval */
-+#endif /* need timeval */
---- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/bits/typesizes.h
@@ -0,0 +1,66 @@
+/* bits/typesizes.h -- underlying types for *_t. kFreeBSD version.
@@ -7243,7 +7151,7 @@
+#include <inet/check_pf.c>
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_getres.c
-@@ -0,0 +1,33 @@
+@@ -0,0 +1,43 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -7268,8 +7176,18 @@
+libc_hidden_proto (__syscall_clock_getres)
+
+# define SYSDEP_GETRES \
-+ case CLOCK_REALTIME: \
-+ case CLOCK_MONOTONIC: \
++ case CLOCK_REALTIME: \
++ case CLOCK_MONOTONIC: \
++ case CLOCK_REALTIME_FAST: \
++ case CLOCK_REALTIME_PRECISE: \
++ case CLOCK_MONOTONIC_FAST: \
++ case CLOCK_MONOTONIC_PRECISE: \
++ case CLOCK_UPTIME: \
++ case CLOCK_UPTIME_FAST: \
++ case CLOCK_UPTIME_PRECISE: \
++ case CLOCK_VIRTUAL: \
++ case CLOCK_PROF: \
++ case CLOCK_SECOND: \
+ retval = INLINE_SYSCALL (clock_getres, 2, clock_id, res); \
+ break
+
@@ -7279,7 +7197,7 @@
+#include <sysdeps/posix/clock_getres.c>
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/clock_gettime.c
-@@ -0,0 +1,33 @@
+@@ -0,0 +1,43 @@
+/* Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -7305,8 +7223,18 @@
+libc_hidden_proto (__syscall_clock_gettime)
+
+# define SYSDEP_GETTIME \
-+ case CLOCK_REALTIME: \
-+ case CLOCK_MONOTONIC: \
++ case CLOCK_REALTIME: \
++ case CLOCK_MONOTONIC: \
++ case CLOCK_REALTIME_FAST: \
++ case CLOCK_REALTIME_PRECISE: \
++ case CLOCK_MONOTONIC_FAST: \
++ case CLOCK_MONOTONIC_PRECISE: \
++ case CLOCK_UPTIME: \
++ case CLOCK_UPTIME_FAST: \
++ case CLOCK_UPTIME_PRECISE: \
++ case CLOCK_VIRTUAL: \
++ case CLOCK_PROF: \
++ case CLOCK_SECOND: \
+ retval = INLINE_SYSCALL (clock_gettime, 2, clock_id, tp); \
+ break
+
@@ -16021,7 +15949,7 @@
+weak_alias (__munmap, munmap)
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/net/ethernet.h
-@@ -0,0 +1,76 @@
+@@ -0,0 +1,77 @@
+/* Copyright (C) 1997, 1999, 2001, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -16057,6 +15985,7 @@
+struct ether_addr
+{
+ u_int8_t octet[ETH_ALEN];
++#define ether_addr_octet octet
+} __attribute__ ((__packed__));
+
+/* 10Mb/s ethernet header */
@@ -16646,7 +16575,7 @@
+#endif /* net/if_ether.h */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/icmp6.h
-@@ -0,0 +1,389 @@
+@@ -0,0 +1,525 @@
+/* Copyright (C) 1991-1997,2000,2006,2009 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
@@ -17035,6 +16964,142 @@
+ uint16_t nd_opt_home_agent_info_lifetime;
+ };
+
++/*-
++ * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
++ * 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. Neither the name of the project 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 PROJECT 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 PROJECT 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.
++ */
++
++/*-
++ * 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.
++ * 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
++ */
++
++/*
++ * IP6 route structure
++ */
++
++struct route_in6 {
++ struct rtentry *ro_rt;
++ struct llentry *ro_lle;
++ struct sockaddr_in6 ro_dst;
++};
++
++/*
++ * Variables related to this implementation
++ * of the internet control message protocol version 6.
++ */
++struct icmp6errstat {
++ u_quad_t icp6errs_dst_unreach_noroute;
++ u_quad_t icp6errs_dst_unreach_admin;
++ u_quad_t icp6errs_dst_unreach_beyondscope;
++ u_quad_t icp6errs_dst_unreach_addr;
++ u_quad_t icp6errs_dst_unreach_noport;
++ u_quad_t icp6errs_packet_too_big;
++ u_quad_t icp6errs_time_exceed_transit;
++ u_quad_t icp6errs_time_exceed_reassembly;
++ u_quad_t icp6errs_paramprob_header;
++ u_quad_t icp6errs_paramprob_nextheader;
++ u_quad_t icp6errs_paramprob_option;
++ u_quad_t icp6errs_redirect; /* we regard redirect as an error here */
++ u_quad_t icp6errs_unknown;
++};
++
++struct icmp6stat {
++/* statistics related to icmp6 packets generated */
++ u_quad_t icp6s_error; /* # of calls to icmp6_error */
++ u_quad_t icp6s_canterror; /* no error 'cuz old was icmp */
++ u_quad_t icp6s_toofreq; /* no error 'cuz rate limitation */
++ u_quad_t icp6s_outhist[256];
++/* statistics related to input message processed */
++ u_quad_t icp6s_badcode; /* icmp6_code out of range */
++ u_quad_t icp6s_tooshort; /* packet < sizeof(struct icmp6_hdr) */
++ u_quad_t icp6s_checksum; /* bad checksum */
++ u_quad_t icp6s_badlen; /* calculated bound mismatch */
++ /*
++ * number of responses: this member is inherited from netinet code, but
++ * for netinet6 code, it is already available in icp6s_outhist[].
++ */
++ u_quad_t icp6s_reflect;
++ u_quad_t icp6s_inhist[256];
++ u_quad_t icp6s_nd_toomanyopt; /* too many ND options */
++ struct icmp6errstat icp6s_outerrhist;
++#define icp6s_odst_unreach_noroute \
++ icp6s_outerrhist.icp6errs_dst_unreach_noroute
++#define icp6s_odst_unreach_admin icp6s_outerrhist.icp6errs_dst_unreach_admin
++#define icp6s_odst_unreach_beyondscope \
++ icp6s_outerrhist.icp6errs_dst_unreach_beyondscope
++#define icp6s_odst_unreach_addr icp6s_outerrhist.icp6errs_dst_unreach_addr
++#define icp6s_odst_unreach_noport icp6s_outerrhist.icp6errs_dst_unreach_noport
++#define icp6s_opacket_too_big icp6s_outerrhist.icp6errs_packet_too_big
++#define icp6s_otime_exceed_transit \
++ icp6s_outerrhist.icp6errs_time_exceed_transit
++#define icp6s_otime_exceed_reassembly \
++ icp6s_outerrhist.icp6errs_time_exceed_reassembly
++#define icp6s_oparamprob_header icp6s_outerrhist.icp6errs_paramprob_header
++#define icp6s_oparamprob_nextheader \
++ icp6s_outerrhist.icp6errs_paramprob_nextheader
++#define icp6s_oparamprob_option icp6s_outerrhist.icp6errs_paramprob_option
++#define icp6s_oredirect icp6s_outerrhist.icp6errs_redirect
++#define icp6s_ounknown icp6s_outerrhist.icp6errs_unknown
++ u_quad_t icp6s_pmtuchg; /* path MTU changes */
++ u_quad_t icp6s_nd_badopt; /* bad ND options */
++ u_quad_t icp6s_badns; /* bad neighbor solicitation */
++ u_quad_t icp6s_badna; /* bad neighbor advertisement */
++ u_quad_t icp6s_badrs; /* bad router advertisement */
++ u_quad_t icp6s_badra; /* bad router advertisement */
++ u_quad_t icp6s_badredirect; /* bad redirect message */
++};
++
+#endif /* netinet/icmpv6.h */
--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/netinet/if_ether.h
@@ -22261,6 +22326,198 @@
+
+#endif /* _SYS_RFORK_H */
--- /dev/null
++++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/socketvar.h
+@@ -0,0 +1,189 @@
++/* This header is used on many systems but for GNU we have
++ almost everything defined in the standard header. */
++
++#include <sys/socket.h>
++
++/*-
++ * Copyright (c) 1982, 1986, 1990, 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.
++ * 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.
++ *
++ * @(#)socketvar.h 8.3 (Berkeley) 2/19/95
++ *
++ * $FreeBSD: src/sys/sys/socketvar.h,v 1.171.2.1.2.1 2009/10/25 01:10:29 kensmith Exp $
++ */
++
++#ifndef _SYS_SOCKETVAR_H_
++#define _SYS_SOCKETVAR_H_
++
++#include <sys/queue.h> /* for TAILQ macros */
++#include <sys/selinfo.h> /* for struct selinfo */
++#include <sys/_lock.h>
++#include <sys/_mutex.h>
++#include <sys/_sx.h>
++
++struct socket;
++struct vnet;
++
++struct xsockbuf {
++ u_int sb_cc;
++ u_int sb_hiwat;
++ u_int sb_mbcnt;
++ u_int sb_mcnt;
++ u_int sb_ccnt;
++ u_int sb_mbmax;
++ int sb_lowat;
++ int sb_timeo;
++ short sb_flags;
++};
++
++/*
++ * Variables for socket buffering.
++ */
++struct sockbuf {
++ struct selinfo sb_sel; /* process selecting read/write */
++ struct mtx sb_mtx; /* sockbuf lock */
++ struct sx sb_sx; /* prevent I/O interlacing */
++ short sb_state; /* (c/d) socket state on sockbuf */
++#define sb_startzero sb_mb
++ struct mbuf *sb_mb; /* (c/d) the mbuf chain */
++ struct mbuf *sb_mbtail; /* (c/d) the last mbuf in the chain */
++ struct mbuf *sb_lastrecord; /* (c/d) first mbuf of last
++ * record in socket buffer */
++ struct mbuf *sb_sndptr; /* (c/d) pointer into mbuf chain */
++ u_int sb_sndptroff; /* (c/d) byte offset of ptr into chain */
++ u_int sb_cc; /* (c/d) actual chars in buffer */
++ u_int sb_hiwat; /* (c/d) max actual char count */
++ u_int sb_mbcnt; /* (c/d) chars of mbufs used */
++ u_int sb_mcnt; /* (c/d) number of mbufs in buffer */
++ u_int sb_ccnt; /* (c/d) number of clusters in buffer */
++ u_int sb_mbmax; /* (c/d) max chars of mbufs to use */
++ u_int sb_ctl; /* (c/d) non-data chars in buffer */
++ int sb_lowat; /* (c/d) low water mark */
++ int sb_timeo; /* (c/d) timeout for read/write */
++ short sb_flags; /* (c/d) flags, see below */
++ int (*sb_upcall)(struct socket *, void *, int); /* (c/d) */
++ void *sb_upcallarg; /* (c/d) */
++};
++
++
++/*
++ * Kernel structure per socket.
++ * Contains send and receive buffer queues,
++ * handle on protocol and pointer to protocol
++ * private data and error information.
++ */
++typedef u_quad_t so_gen_t;
++
++
++/*-
++ * Locking key to struct socket:
++ * (a) constant after allocation, no locking required.
++ * (b) locked by SOCK_LOCK(so).
++ * (c) locked by SOCKBUF_LOCK(&so->so_rcv).
++ * (d) locked by SOCKBUF_LOCK(&so->so_snd).
++ * (e) locked by ACCEPT_LOCK().
++ * (f) not locked since integer reads/writes are atomic.
++ * (g) used only as a sleep/wakeup address, no value.
++ * (h) locked by global mutex so_global_mtx.
++ */
++struct socket {
++ int so_count; /* (b) reference count */
++ short so_type; /* (a) generic type, see socket.h */
++ short so_options; /* from socket call, see socket.h */
++ short so_linger; /* time to linger while closing */
++ short so_state; /* (b) internal state flags SS_* */
++ int so_qstate; /* (e) internal state flags SQ_* */
++ void *so_pcb; /* protocol control block */
++ struct vnet *so_vnet; /* network stack instance */
++ struct protosw *so_proto; /* (a) protocol handle */
++/*
++ * Variables for connection queuing.
++ * Socket where accepts occur is so_head in all subsidiary sockets.
++ * If so_head is 0, socket is not related to an accept.
++ * For head socket so_incomp queues partially completed connections,
++ * while so_comp is a queue of connections ready to be accepted.
++ * If a connection is aborted and it has so_head set, then
++ * it has to be pulled out of either so_incomp or so_comp.
++ * We allow connections to queue up based on current queue lengths
++ * and limit on number of queued connections for this socket.
++ */
++ struct socket *so_head; /* (e) back pointer to listen socket */
++ TAILQ_HEAD(, socket) so_incomp; /* (e) queue of partial unaccepted connections */
++ TAILQ_HEAD(, socket) so_comp; /* (e) queue of complete unaccepted connections */
++ TAILQ_ENTRY(socket) so_list; /* (e) list of unaccepted connections */
++ u_short so_qlen; /* (e) number of unaccepted connections */
++ u_short so_incqlen; /* (e) number of unaccepted incomplete
++ connections */
++ u_short so_qlimit; /* (e) max number queued connections */
++ short so_timeo; /* (g) connection timeout */
++ u_short so_error; /* (f) error affecting connection */
++ struct sigio *so_sigio; /* [sg] information for async I/O or
++ out of band data (SIGURG) */
++ u_long so_oobmark; /* (c) chars to oob mark */
++ TAILQ_HEAD(, aiocblist) so_aiojobq; /* AIO ops waiting on socket */
++
++ struct sockbuf so_rcv, so_snd;
++
++ struct ucred *so_cred; /* (a) user credentials */
++ struct label *so_label; /* (b) MAC label for socket */
++ struct label *so_peerlabel; /* (b) cached MAC label for peer */
++ /* NB: generation count must not be first. */
++ so_gen_t so_gencnt; /* (h) generation count */
++ void *so_emuldata; /* (b) private data for emulators */
++ struct so_accf {
++ struct accept_filter *so_accept_filter;
++ void *so_accept_filter_arg; /* saved filter args */
++ char *so_accept_filter_str; /* saved user args */
++ } *so_accf;
++ int so_fibnum; /* routing domain for this socket */
++};
++
++/*
++ * Externalized form of struct socket used by the sysctl(3) interface.
++ */
++struct xsocket {
++ size_t xso_len; /* length of this structure */
++ struct socket *xso_so; /* makes a convenient handle sometimes */
++ short so_type;
++ short so_options;
++ short so_linger;
++ short so_state;
++ caddr_t so_pcb; /* another convenient handle */
++ int xso_protocol;
++ int xso_family;
++ u_short so_qlen;
++ u_short so_incqlen;
++ u_short so_qlimit;
++ short so_timeo;
++ u_short so_error;
++ pid_t so_pgid;
++ u_long so_oobmark;
++ struct xsockbuf so_rcv, so_snd;
++ uid_t so_uid; /* XXX */
++};
++
++#endif /* !_SYS_SOCKETVAR_H_ */
+--- /dev/null
+++ b/ports/sysdeps/unix/bsd/bsd4.4/kfreebsd/sys/swap.h
@@ -0,0 +1,37 @@
+/* Calls to enable swapping on specified locations. FreeBSD version.
Reply to: