More FreeBSD 5.0. Most of it builds now.
{
unsigned int resid;
register afs_int32 code;
- register afs_int32 cnt1=0;
AFS_STATCNT(osi_Read);
/**
*/
#include <afsconfig.h>
#include "afs/param.h"
+#include <sys/param.h>
+#ifdef AFS_FBSD50_ENV
+#include <sys/sysproto.h>
+#endif
RCSID("$Header$");
gid_t *gidset,
int change_parent);
+#ifdef AFS_FBSD50_ENV
+/*
+ * This does nothing useful yet.
+ * In 5.0, creds are associated not with a process, but with a thread.
+ * Probably the right thing to do is replace struct proc with struct thread
+ * everywhere, including setpag.
+ * That will be a tedious undertaking.
+ * For now, I'm just passing curproc to AddPag.
+ * This is probably wrong and I don't know what the consequences might be.
+ */
+
+int
+Afs_xsetgroups(struct thread *td, struct setgroups_args *uap)
+{
+ int code = 0;
+ struct vrequest treq;
+ struct ucred *cr;
+
+ cr = crdup(td->td_ucred);
+
+ AFS_STATCNT(afs_xsetgroups);
+ AFS_GLOCK();
+
+ code = afs_InitReq(&treq, cr);
+ AFS_GUNLOCK();
+ crfree(cr);
+ if (code) return setgroups(td, uap); /* afs has shut down */
+
+ code = setgroups(td, uap);
+ /* Note that if there is a pag already in the new groups we don't
+ * overwrite it with the old pag.
+ */
+ cr = crdup(td->td_ucred);
+
+ if (PagInCred(cr) == NOPAG) {
+ if (((treq.uid >> 24) & 0xff) == 'A') {
+ AFS_GLOCK();
+ /* we've already done a setpag, so now we redo it */
+ AddPag(curproc, treq.uid, &cr);
+ AFS_GUNLOCK();
+ }
+ }
+ crfree(cr);
+ return code;
+}
+#else /* FBSD50 */
int
Afs_xsetgroups(p, args, retval)
struct proc *p;
crfree(cr);
return code;
}
+#endif
int
}
-
static int
afs_setgroups(
struct proc *proc,
gid_t *gidset,
int change_parent)
{
+#ifndef AFS_FBSD50_ENV
int ngrps;
int i;
gid_t *gp;
oldcr=proc->p_cred->pc_ucred;
proc->p_cred->pc_ucred=cr;
crfree(oldcr);
+#endif
return(0);
}
#include "afs/afs_stats.h" /* statistics stuff */
#include <sys/queue.h>
#include <sys/lock.h>
-#include <ufs/ufsmount.h>
#include <ufs/ufs/dinode.h>
+#if defined(AFS_FBSD50_ENV)
+#include <ufs/ufs/extattr.h>
+#endif
+#include <ufs/ufsmount.h>
+int
getinode(fs, dev, inode, ipp, perror)
struct mount *fs;
struct inode **ipp;
if (!fs) {
register struct ufsmount *ump;
register struct mount *mp;
-
- simple_lock(&mountlist_slock);
+
+#if defined(AFS_FBSD50_ENV)
+ mtx_lock(&mountlist_mtx);
+#else
+ simple_lock(&mountlist_slock);
+#endif
if (mp = TAILQ_FIRST(&mountlist)) do {
/*
- * XXX Also do the test for MFS
+ * XXX Also do the test for MFS
*/
#undef m_data
#undef m_next
- if (mp->mnt_stat.f_type == MOUNT_UFS) {
+ if (mp->mnt_stat.f_type == MOUNT_UFS) {
ump = VFSTOUFS(mp);
if (ump->um_fs == NULL)
break;
}
mp = TAILQ_NEXT(mp, mnt_list);
} while (mp != TAILQ_FIRST(&mountlist));
+#if defined(AFS_FBSD50_ENV)
+ mtx_unlock(&mountlist_mtx);
+#else
simple_unlock(&mountlist_slock);
+#endif
if (!fs)
return(ENXIO);
}
- code = VFS_VGET(fs,inode, &vp);
+#if defined(AFS_FBSD50_ENV)
+ code = VFS_VGET(fs, inode, 0, &vp);
+#else
+ code = VFS_VGET(fs, inode, &vp);
+#endif
if (code != 0) {
*perror = BAD_IGET;
return code;
}
}
+int
igetinode(vfsp, dev, inode, ipp, perror)
struct inode **ipp;
struct mount *vfsp;
ino_t inode;
int *perror;
{
- struct inode *pip, *ip;
- extern struct osi_dev cacheDev;
+ struct inode *ip;
register int code = 0;
*perror = 0;
if (ip->i_mode == 0) {
/* Not an allocated inode */
- vput(ITOV(ip));
+ vput(ITOV(ip));
return(ENOENT);
}
if (ip->i_nlink == 0 || (ip->i_mode&IFMT) != IFREG) {
- vput(ITOV(ip));
+ vput(ITOV(ip));
return(ENOENT);
}
}
+int
afs_syscall_iopen(dev, inode, usrmod, retval)
long *retval;
int dev, inode, usrmod;
* Restricted to super user.
* Only VICEMAGIC type inodes.
*/
+int
afs_syscall_iincdec(dev, inode, inode_p1, amount)
int dev, inode, inode_p1, amount;
{
return(0);
}
#else
+int
afs_syscall_icreate(dev, near_inode, param1, param2, param3, param4, retval)
long *retval;
long dev, near_inode, param1, param2, param3, param4;
{
return EOPNOTSUPP;
}
+
+int
afs_syscall_iopen(dev, inode, usrmod, retval)
long *retval;
int dev, inode, usrmod;
{
return EOPNOTSUPP;
}
+
+int
afs_syscall_iincdec(dev, inode, inode_p1, amount)
int dev, inode, inode_p1, amount;
{
#define osi_vnhold(avc,r) do { VN_HOLD((struct vnode *)(avc)); } while (0)
-#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \
- vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(aresid), curproc)
#undef gop_lookupname
#define gop_lookupname osi_lookupname
#ifdef KERNEL
extern struct lock afs_global_lock;
+
#if defined(AFS_FBSD50_ENV)
#define VT_AFS "afs"
#define VROOT VV_ROOT
#define v_flag v_vflag
+#define afs_suser() (!suser(curthread))
+#define simple_lock(x) mtx_lock(x)
+#define simple_unlock(x) mtx_unlock(x)
+#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \
+ vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(cred),(aresid), curthread)
extern struct thread * afs_global_owner;
#define AFS_GLOCK() \
do { \
lockmgr(&afs_global_lock, LK_RELEASE, 0, curthread); \
} while(0)
#define ISAFS_GLOCK() (afs_global_owner == curthread && curthread)
+
#else /* FBSD50 */
+
+#define gop_rdwr(rw,gp,base,len,offset,segflg,unit,cred,aresid) \
+ vn_rdwr((rw),(gp),(base),(len),(offset),(segflg),(unit),(cred),(aresid), curproc)
extern struct proc * afs_global_owner;
#define AFS_GLOCK() \
do { \
} while(0)
#define ISAFS_GLOCK() (afs_global_owner == curproc && curproc)
#endif /* FBSD50 */
+
#define AFS_RXGLOCK()
#define AFS_RXGUNLOCK()
#define ISAFS_RXGLOCK() 1
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#include <sys/namei.h>
+
+#ifndef AFS_FBSD50_ENV
/*
* afs_suser() returns true if the caller is superuser, false otherwise.
*
}
return(0);
}
+#endif
int osi_lookupname(char *aname, enum uio_seg seg, int followlink,
struct vnode **dirvpp, struct vnode **vpp)
afs_sync,
afs_vget,
afs_fhtovp,
+#ifdef AFS_FBSD50_ENV
+ vfs_stdcheckexp,
+#endif
afs_vptofh,
afs_init,
+#ifdef AFS_FBSD50_ENV
+ vfs_stduninit,
+#endif
afs_sysctl
};
return EBUSY;
AFS_GUNLOCK();
- vp=avc;
+ vp = AFSTOV(avc);
simple_lock(&vp->v_interlock);
if (VOP_GETVOBJECT(vp, &obj) == 0) {
vm_object_page_remove(obj, 0, 0, FALSE);
struct vnode *vp;
struct vm_object *obj;
int anyio,tries;
+
ReleaseWriteLock(&avc->lock);
AFS_GUNLOCK();
tries=5;
- vp=avc;
+ vp = AFSTOV(avc);
do {
- anyio=0;
- simple_lock(&vp->v_interlock);
- if (VOP_GETVOBJECT(vp, &obj) == 0 &&
- (obj->flags & OBJ_MIGHTBEDIRTY)) {
- if (!vget(vp,
- LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY | LK_NOOBJ, curproc)) {
- if (VOP_GETVOBJECT(vp, &obj) == 0) {
- vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
- anyio = 1;
- }
- vput(vp);
- }
- } else {
- simple_unlock(&vp->v_interlock);
- }
+ anyio=0;
+ simple_lock(&vp->v_interlock);
+ if (VOP_GETVOBJECT(vp, &obj) == 0 &&
+ (obj->flags & OBJ_MIGHTBEDIRTY)) {
+#ifdef AFS_FBSD50_ENV
+ if (!vget(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY, curthread)) {
+#else
+ if (!vget(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY | LK_NOOBJ, curproc)) {
+#endif
+ if (VOP_GETVOBJECT(vp, &obj) == 0) {
+ vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
+ anyio = 1;
+ }
+ vput(vp);
+ }
+ } else
+ simple_unlock(&vp->v_interlock);
} while (anyio && (--tries > 0));
AFS_GLOCK();
ObtainWriteLock(&avc->lock,94);
struct vnode *vp;
struct vm_object *obj;
int anyio, tries;
+
ReleaseWriteLock(&avc->lock);
AFS_GUNLOCK();
- tries=5;
- vp=avc;
+ tries = 5;
+ vp = AFSTOV(avc);
do {
- anyio=0;
- simple_lock(&vp->v_interlock);
- if (VOP_GETVOBJECT(vp, &obj) == 0 &&
- (obj->flags & OBJ_MIGHTBEDIRTY)) {
- if (!vget(vp,
- LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY | LK_NOOBJ, curproc)) {
- if (VOP_GETVOBJECT(vp, &obj) == 0) {
- vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
- anyio = 1;
- }
- vput(vp);
- }
- } else {
- simple_unlock(&vp->v_interlock);
- }
+ anyio=0;
+ simple_lock(&vp->v_interlock);
+ if (VOP_GETVOBJECT(vp, &obj) == 0 &&
+ (obj->flags & OBJ_MIGHTBEDIRTY)) {
+#ifdef AFS_FBSD50_ENV
+ if (!vget(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY, curthread)) {
+#else
+ if (!vget(vp, LK_INTERLOCK | LK_EXCLUSIVE | LK_RETRY | LK_NOOBJ, curproc)) {
+#endif
+ if (VOP_GETVOBJECT(vp, &obj) == 0) {
+ vm_object_page_clean(obj, 0, 0, OBJPC_SYNC);
+ anyio = 1;
+ }
+ vput(vp);
+ }
+ } else
+ simple_unlock(&vp->v_interlock);
} while (anyio && (--tries > 0));
simple_lock(&vp->v_interlock);
if (VOP_GETVOBJECT(vp, &obj) == 0) {
- vm_object_page_remove(obj, 0, 0, FALSE);
+ vm_object_page_remove(obj, 0, 0, FALSE);
}
simple_unlock(&vp->v_interlock);
/*vinvalbuf(AFSTOV(avc),0, NOCRED, curproc, 0,0);*/
{
struct vnode *vp;
struct vm_object *obj;
- vp=avc;
+
+ vp = AFSTOV(avc);
simple_lock(&vp->v_interlock);
if (VOP_GETVOBJECT(vp, &obj) == 0) {
- vm_object_page_remove(obj, 0, 0, FALSE);
+ vm_object_page_remove(obj, 0, 0, FALSE);
}
simple_unlock(&vp->v_interlock);
/*vinvalbuf(AFSTOV(avc),0, NOCRED, curproc, 0,0);*/
#include <afs/afs_stats.h> /* statistics */
#include <sys/malloc.h>
#include <sys/namei.h>
+#ifndef AFS_FBSD50_ENV
#include <vm/vm_zone.h>
+#endif
#include <vm/vm_page.h>
#include <vm/vm_object.h>
#include <vm/vm_pager.h>
{ &vop_access_desc, (vop_t *) afs_vop_access }, /* access */
{ &vop_advlock_desc, (vop_t *) afs_vop_advlock }, /* advlock */
{ &vop_bmap_desc, (vop_t *) afs_vop_bmap }, /* bmap */
+#ifndef AFS_FBSD50_ENV
{ &vop_bwrite_desc, (vop_t *) vop_stdbwrite },
+#endif
{ &vop_close_desc, (vop_t *) afs_vop_close }, /* close */
{ &vop_createvobject_desc, (vop_t *) vop_stdcreatevobject },
{ &vop_destroyvobject_desc, (vop_t *) vop_stddestroyvobject },
register int flags = ap->a_cnp->cn_flags;
int lockparent; /* 1 => lockparent flag is set */
int wantparent; /* 1 => wantparent or lockparent flag */
- struct proc *p;
+#ifdef AFS_FBSD50_ENV
+ struct thread *p = ap->a_cnp->cn_thread;
+#else
+ struct proc *p = ap->a_cnp->cn_proc;
+#endif
GETNAME();
- p=cnp->cn_proc;
+
lockparent = flags & LOCKPARENT;
wantparent = flags & (LOCKPARENT|WANTPARENT);
-
+int
#if defined(AFS_SUN5_ENV) || defined(AFS_OSF_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
afs_ustrategy(abp, credp)
struct AFS_UCRED *credp;
ReleaseReadLock(&tvc->lock);
osi_Assert(credp);
#endif
+#ifdef AFS_FBSD50_ENV
+ if (abp->b_iocmd == BIO_READ) {
+#else
if ((abp->b_flags & B_READ) == B_READ) {
+#endif
/* read b_bcount bytes into kernel address b_un.b_addr starting
at byte DEV_BSIZE * b_blkno. Bzero anything we can't read,
and finally call iodone(abp). File is in abp->b_vp. Credentials
#endif
}
#if !defined(AFS_AIX32_ENV) && !defined(AFS_SUN5_ENV)
-#if defined(AFS_DUX40_ENV) || defined (AFS_XBSD_ENV)
+#if defined(AFS_DUX40_ENV) || (defined (AFS_XBSD_ENV) && !defined (AFS_FBSD50_ENV))
if (code) {
abp->b_error = code;
abp->b_flags |= B_ERROR;
afs_Trace2(afs_iclSetp, CM_TRACE_CHECKCODE,
ICL_TYPE_INT32, acode, ICL_TYPE_INT32, where);
}
- if (acode & ~0xff == ERROR_TABLE_BASE_uae)
+ if ((acode & ~0xff) == ERROR_TABLE_BASE_uae)
acode = et_to_sys_error(acode);
if (!areq || !areq->initd)
return acode;
/* Before we do anything with acode, make sure we translate it back to
a system error */
- if (acode & ~0xff == ERROR_TABLE_BASE_uae)
+ if ((acode & ~0xff) == ERROR_TABLE_BASE_uae)
acode = et_to_sys_error(acode);
if (acode == 0) {
#else
if (!VFS_STATFS(filevp->v_vfsp, &st, NULL))
#endif /* AFS_SGI65_ENV */
-#else /* AFS_SGI_ENV */
-#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX100_ENV)
+#elif defined(AFS_SUN5_ENV) || defined(AFS_HPUX100_ENV)
if (!VFS_STATVFS(filevp->v_vfsp, &st))
-#else
-#ifdef AFS_OSF_ENV
+#elif defined(AFS_OSF_ENV)
VFS_STATFS(filevp->v_vfsp, code);
/* struct copy */
st = filevp->v_vfsp->m_stat;
if (code == 0)
-#else /* AFS_OSF_ENV */
-#ifdef AFS_AIX41_ENV
+#elif defined(AFS_AIX41_ENV)
if (!VFS_STATFS(filevp->v_vfsp, &st, &afs_osi_cred))
-#else
-#ifdef AFS_LINUX20_ENV
+#elif defined(AFS_LINUX20_ENV)
{
KERNEL_SPACE_DECL;
TO_USER_SPACE();
VFS_STATFS(filevp->v_vfsp, &st);
TO_KERNEL_SPACE();
}
-#else
-#if defined(AFS_DARWIN_ENV)
+#elif defined(AFS_DARWIN_ENV)
if (!VFS_STATFS(filevp->v_mount, &st, current_proc()))
-#else
-#if defined(AFS_XBSD_ENV)
+#elif defined(AFS_FBSD50_ENV)
+ if (!VFS_STATFS(filevp->v_mount, &st, curthread))
+#elif defined(AFS_XBSD_ENV)
if (!VFS_STATFS(filevp->v_mount, &st, curproc))
#else
if (!VFS_STATFS(filevp->v_vfsp, &st))
-#endif /* AFS_XBSD_ENV */
-#endif /* AFS_DARWIN_ENV */
-#endif /* AFS_LINUX20_ENV */
-#endif /* AIX41 */
-#endif /* OSF */
-#endif /* SUN5 HP10 */
-#endif /* SGI */
+#endif /* SGI... */
#if defined(AFS_SUN5_ENV) || defined(AFS_HPUX100_ENV)
afs_fsfragsize = st.f_frsize - 1;
#else
# include "h/resource.h"
#endif
# endif /* AFS_HPUX_ENV */
-#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV)
+#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
+# if defined(AFS_FBSD50_ENV)
+struct vop_getwritemount_args;
+# endif
# include <sys/uio.h>
# include <sys/mount.h>
# include <sys/namei.h>
#define AFS_USR_FBSD_ENV 1
#define AFS_NONFSTRANS 1
-#define O_SYNC O_FSYNC
-
#define AFS_MOUNT_AFS "afs" /* The name of the filesystem type. */
#define AFS_SYSCALL 339
#define AFS_NAMEI_ENV 1 /* User space interface to file system */
#include <sys/systm.h>
#include <sys/proc.h>
+#ifdef AFS_FBSD50_ENV
+#include <sys/lockmgr.h>
+#else
#include <sys/lock.h>
+#endif
#define RX_ENABLE_LOCKS 1
#define AFS_GLOBAL_RXLOCK_KERNEL
typedef int afs_kcondvar_t;
#define HEAVY_LOCKS
-#ifdef NULL_LOCKS
+#if defined(NULL_LOCKS)
typedef struct {
struct proc *owner;
} afs_kmutex_t;
#undef MUTEX_ISMINE
#define MUTEX_ISMINE(a) (((afs_kmutex_t *)(a))->owner == curproc)
-#else
-#ifdef HEAVY_LOCKS
+#elif defined(AFS_FBSD50_ENV)
+typedef struct {
+ struct lock lock;
+ struct thread *owner;
+} afs_kmutex_t;
+
+
+#define MUTEX_INIT(a,b,c,d) \
+ do { \
+ lockinit(&(a)->lock,PSOCK, "afs rx mutex", 0, 0); \
+ (a)->owner = 0; \
+ } while(0);
+#define MUTEX_DESTROY(a) \
+ do { \
+ (a)->owner = (struct proc *)-1; \
+ } while(0);
+#define MUTEX_ENTER(a) \
+ do { \
+ lockmgr(&(a)->lock, LK_EXCLUSIVE, 0, curthread); \
+ osi_Assert((a)->owner == 0); \
+ (a)->owner = curthread; \
+ } while(0);
+#define MUTEX_TRYENTER(a) \
+ ( lockmgr(&(a)->lock, LK_EXCLUSIVE|LK_NOWAIT, 0, curthread) ? 0 : ((a)->owner = curthread, 1) )
+#define xMUTEX_TRYENTER(a) \
+ ( osi_Assert((a)->owner == 0), (a)->owner = curthread, 1)
+#define MUTEX_EXIT(a) \
+ do { \
+ osi_Assert((a)->owner == curthread); \
+ (a)->owner = 0; \
+ lockmgr(&(a)->lock, LK_RELEASE, 0, curthread); \
+ } while(0);
+
+#undef MUTEX_ISMINE
+#define MUTEX_ISMINE(a) (((afs_kmutex_t *)(a))->owner == curthread)
+#elif defined(HEAVY_LOCKS)
typedef struct {
struct lock lock;
struct proc *owner;
#undef MUTEX_ISMINE
#define MUTEX_ISMINE(a) (((afs_kmutex_t *)(a))->owner == curproc)
#endif
-#endif
#undef osirx_AssertMine
#include "rx/rx_kcommon.h"
#ifdef RXK_LISTENER_ENV
-int osi_NetReceive(osi_socket so, struct sockaddr_in *addr, struct iovec *dvec,
+int osi_NetReceive(osi_socket asocket, struct sockaddr_in *addr, struct iovec *dvec,
int nvecs, int *alength)
{
- struct socket *asocket = (struct socket *)so;
struct uio u;
int i;
struct iovec iov[RX_MAXIOVECS];
u.uio_resid = *alength;
u.uio_segflg = UIO_SYSSPACE;
u.uio_rw = UIO_READ;
+#ifdef AFS_FBSD50_ENV
+ u.uio_td = NULL;
+#else
u.uio_procp = NULL;
+#endif
if (haveGlock)
AFS_GUNLOCK();
u.uio_resid = alength;
u.uio_segflg = UIO_SYSSPACE;
u.uio_rw = UIO_WRITE;
+#ifdef AFS_FBSD50_ENV
+ u.uio_td = NULL;
+#else
u.uio_procp = NULL;
+#endif
addr->sin_len = sizeof(struct sockaddr_in);
#if KNET_DEBUG
printf("+");
#endif
+#ifdef AFS_FBSD50_ENV
+ code = sosend(asocket, (struct sockaddr *) addr, &u, NULL, NULL, 0, curthread);
+#else
code = sosend(asocket, (struct sockaddr *) addr, &u, NULL, NULL, 0, curproc);
+#endif
#if KNET_DEBUG
if (code) {
if (code == EINVAL)
{
register afs_int32 code;
struct socket *newSocket;
-#if !defined(AFS_HPUX1122_ENV)
+#if (!defined(AFS_HPUX1122_ENV) && !defined(AFS_FBSD50_ENV))
struct mbuf *nam;
#endif
struct sockaddr_in myaddr;
#endif /* else AFS_HPUX110_ENV */
#elif defined(AFS_SGI65_ENV) || defined(AFS_OBSD_ENV)
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, IPPROTO_UDP);
-#elif defined(AFS_FBSD_ENV)
+#elif defined(AFS_FBSD50_ENV)
+ code = socreate(AF_INET, &newSocket, SOCK_DGRAM, IPPROTO_UDP, &afs_osi_cred, curthread);
+#elif defined(AFS_FBSD40_ENV)
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, IPPROTO_UDP, curproc);
#else
code = socreate(AF_INET, &newSocket, SOCK_DGRAM, 0);
osi_Panic("osi_NewSocket: last attempt to reserve 32K failed!\n");
}
#if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD_ENV)
-#if defined(AFS_FBSD_ENV)
+#if defined(AFS_FBSD50_ENV)
+ code = sobind(newSocket, (struct sockaddr *) &myaddr, curthread);
+#elif defined(AFS_FBSD40_ENV)
code = sobind(newSocket, (struct sockaddr *) &myaddr, curproc);
#else
code = sobind(newSocket, (struct sockaddr *) &myaddr);
#include "h/dirent.h"
#include "h/socket.h"
#include "h/domain.h"
+#if defined(AFS_FBSD50_ENV)
+#include "h/bio.h"
+#endif
#include "h/buf.h"
#include "h/mbuf.h"
#endif /* AFS_FBSD_ENV */