Remove size test in afs_buffer.c:DRead().
Cleanups and prototypes.
OpenBSD client works now, at least readonly.
void osi_DisableAtimes(struct vnode *avp)
{
+#if 0
struct inode *ip = VTOI(avp);
ip->i_flag &= ~IACC;
+#endif
}
* If the osi_file passed in is NULL, panic only if AFS is not shutting
* down. No point in crashing when we are already shutting down
*/
- if ( !afile ) {
- if ( !afs_shuttingdown )
+ if (!afile) {
+ if (!afs_shuttingdown)
osi_Panic("osi_Read called with null param");
else
return EIO;
}
- if (offset != -1) afile->offset = offset;
+ if (offset != -1)
+ afile->offset = offset;
AFS_GUNLOCK();
- code = gop_rdwr(UIO_READ, afile->vnode, (caddr_t) aptr, asize, afile->offset,
- AFS_UIOSYS, IO_UNIT, &afs_osi_cred, &resid);
+ code = vn_rdwr(UIO_READ, afile->vnode, aptr, asize, afile->offset,
+ AFS_UIOSYS, IO_UNIT, &afs_osi_cred, &resid, curproc);
AFS_GLOCK();
if (code == 0) {
code = asize - resid;
afile->offset += code;
osi_DisableAtimes(afile->vnode);
- }
- else {
+ } else {
afs_Trace2(afs_iclSetp, CM_TRACE_READFAILED, ICL_TYPE_INT32, resid,
ICL_TYPE_INT32, code);
code = -1;
AFS_GUNLOCK();
VOP_LOCK(afile->vnode, LK_EXCLUSIVE | LK_RETRY, curproc);
- code = gop_rdwr(UIO_WRITE, afile->vnode, (caddr_t) aptr, asize, afile->offset,
- AFS_UIOSYS, IO_UNIT, &afs_osi_cred, &resid);
+ code = vn_rdwr(UIO_WRITE, afile->vnode, (caddr_t) aptr, asize, afile->offset,
+ AFS_UIOSYS, IO_UNIT, &afs_osi_cred, &resid, curproc);
VOP_UNLOCK(afile->vnode, 0, curproc);
AFS_GLOCK();
#define osi_vnhold(avc, r) afs_vget(AFSTOV(avc), 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)
-
#define afs_suser() afs_osi_suser(osi_curcred())
extern int (**afs_vnodeop_p)();
+/*
+ * $Id$
+ */
+
+/*
+copyright 2002
+the regents of the university of michigan
+all rights reserved
+
+permission is granted to use, copy, create derivative works
+and redistribute this software and such derivative works
+for any purpose, so long as the name of the university of
+michigan is not used in any advertising or publicity
+pertaining to the use or distribution of this software
+without specific, written prior authorization. if the
+above copyright notice or any other identification of the
+university of michigan is included in any copy of any
+portion of this software, then the disclaimer below must
+also be included.
+
+this software is provided as is, without representation
+from the university of michigan as to its fitness for any
+purpose, and without warranty by the university of
+michigan of any kind, either express or implied, including
+without limitation the implied warranties of
+merchantability and fitness for a particular purpose. the
+regents of the university of michigan shall not be liable
+for any damages, including special, indirect, incidental, or
+consequential damages, with respect to any claim arising
+out of or in connection with the use of the software, even
+if it has been or is hereafter advised of the possibility of
+such damages.
+*/
+
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
* directory or online at http://www.openafs.org/dl/license10.html
*/
-
#include <afsconfig.h>
#include "afs/param.h"
+/*
+ * OpenBSD specific assistance routines & VFS ops
+ * Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
+ * OpenBSD version by Jim Rees <rees@umich.edu>
+ *
+ * $Id$
+ */
+
+/*
+copyright 2002
+the regents of the university of michigan
+all rights reserved
+
+permission is granted to use, copy, create derivative works
+and redistribute this software and such derivative works
+for any purpose, so long as the name of the university of
+michigan is not used in any advertising or publicity
+pertaining to the use or distribution of this software
+without specific, written prior authorization. if the
+above copyright notice or any other identification of the
+university of michigan is included in any copy of any
+portion of this software, then the disclaimer below must
+also be included.
+
+this software is provided as is, without representation
+from the university of michigan as to its fitness for any
+purpose, and without warranty by the university of
+michigan of any kind, either express or implied, including
+without limitation the implied warranties of
+merchantability and fitness for a particular purpose. the
+regents of the university of michigan shall not be liable
+for any damages, including special, indirect, incidental, or
+consequential damages, with respect to any claim arising
+out of or in connection with the use of the software, even
+if it has been or is hereafter advised of the possibility of
+such damages.
+*/
+
/*
Copyright 1995 Massachusetts Institute of Technology. All Rights
Reserved.
NONINFRINGEMENT.
*/
-/*
- * OpenBSD specific assistance routines & VFS ops
- * Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
- * OpenBSD version by Jim Rees <rees@umich.edu>
- *
- * $Id$
- */
-
/*
* Some code cribbed from ffs_vfsops and other NetBSD sources, which
* are marked:
!(code = afs_CheckInit())) {
tvp = afs_GetVCache(&afs_rootFid, &treq, NULL, NULL);
if (tvp) {
-printf("tvp %x %d\n", tvp, AFSTOV(tvp)->v_usecount);
/* There is really no reason to over-hold this bugger--it's held
by the root filesystem reference. */
if (afs_globalVp != tvp) {
+#ifdef AFS_DONT_OVERHOLD_GLOBALVP
if (afs_globalVp)
-printf("afs_globalVp %x %d\n", afs_globalVp, AFSTOV(afs_globalVp)->v_usecount);
-/* AFS_RELE(AFSTOV(afs_globalVp));*/
+ AFS_RELE(AFSTOV(afs_globalVp));
+#endif
afs_globalVp = tvp;
AFS_HOLD(AFSTOV(afs_globalVp));
}
+/*
+ * OpenBSD specific vnodeops + other misc interface glue
+ * Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
+ * OpenBSD version by Jim Rees <rees@umich.edu>
+ *
+ * $Id$
+ */
+
+/*
+copyright 2002
+the regents of the university of michigan
+all rights reserved
+
+permission is granted to use, copy, create derivative works
+and redistribute this software and such derivative works
+for any purpose, so long as the name of the university of
+michigan is not used in any advertising or publicity
+pertaining to the use or distribution of this software
+without specific, written prior authorization. if the
+above copyright notice or any other identification of the
+university of michigan is included in any copy of any
+portion of this software, then the disclaimer below must
+also be included.
+
+this software is provided as is, without representation
+from the university of michigan as to its fitness for any
+purpose, and without warranty by the university of
+michigan of any kind, either express or implied, including
+without limitation the implied warranties of
+merchantability and fitness for a particular purpose. the
+regents of the university of michigan shall not be liable
+for any damages, including special, indirect, incidental, or
+consequential damages, with respect to any claim arising
+out of or in connection with the use of the software, even
+if it has been or is hereafter advised of the possibility of
+such damages.
+*/
+
/*
Copyright 1995 Massachusetts Institute of Technology. All Rights
Reserved.
NONINFRINGEMENT.
*/
-/*
- * OpenBSD specific vnodeops + other misc interface glue
- * Original NetBSD version for Transarc afs by John Kohl <jtk@MIT.EDU>
- * OpenBSD version by Jim Rees <rees@umich.edu>
- *
- * $Id$
- */
-
/*
* A bunch of code cribbed from NetBSD ufs_vnops.c, ffs_vnops.c, and
* nfs_vnops.c which carry this copyright:
int afs_debug;
-#define NBSD_WRITES_ALLOWED
-#ifndef NBSD_WRITES_ALLOWED
-int nbsd_writes_allowed = 0;
-#endif
-
#undef vrele
#define vrele afs_nbsd_rele
#undef VREF
#define VREF afs_nbsd_ref
+extern int afs_lookup();
+extern int afs_open();
+extern int afs_close();
+extern int HandleIoctl(struct vcache *avc, afs_int32 acom, struct afs_ioctl *adata);
+extern int afs_fsync();
+extern int afs_remove();
+extern int afs_link();
+extern int afs_rename();
+extern int afs_mkdir();
+extern int afs_rmdir();
+extern int afs_symlink();
+extern int afs_readdir();
+extern int afs_readlink();
+
int
afs_nbsd_lookup(ap)
struct vop_lookup_args /* {
/* vnode layer handles excl/nonexcl */
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
-#endif
error = afs_create(VTOAFS(dvp), name, ap->a_vap, NONEXCL,
ap->a_vap->va_mode, &vcp,
cnp->cn_cred);
{
int error;
struct vcache *vc = VTOAFS(ap->a_vp);
+
error = afs_open(&vc, ap->a_mode, ap->a_cred);
#ifdef DIAGNOSTIC
if (AFSTOV(vc) != ap->a_vp)
struct proc *a_p;
} */ *ap;
{
- return afs_close(VTOAFS(ap->a_vp), ap->a_fflag, ap->a_cred, ap->a_p);
+ return afs_close(VTOAFS(ap->a_vp), ap->a_fflag, ap->a_cred);
}
int
struct proc *a_p;
} */ *ap;
{
- struct vcache *tvc = VTOAFS(ap->a_vp);
- int error = 0;
-
/* in case we ever get in here... */
AFS_STATCNT(afs_ioctl);
- if (((ap->a_command >> 8) & 0xff) == 'V') {
+ if (((ap->a_command >> 8) & 0xff) == 'V')
/* This is a VICEIOCTL call */
- error = HandleIoctl(tvc, (struct file *)0/*Not used*/,
- ap->a_command, ap->a_data);
- return(error);
- } else {
+ return HandleIoctl(VTOAFS(ap->a_vp), ap->a_command, (struct afs_ioctl *) ap->a_data);
+ else
/* No-op call; just return. */
- return(ENOTTY);
- }
+ return ENOTTY;
}
/* ARGSUSED */
{
int wait = ap->a_waitfor == MNT_WAIT;
struct vnode *vp = ap->a_vp;
+
vflushbuf(vp, wait);
return afs_fsync(VTOAFS(vp), ap->a_cred);
}
struct vnode *dvp = ap->a_dvp;
GETNAME();
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
-#endif
error = afs_remove(VTOAFS(dvp), name, cnp->cn_cred);
if (dvp == vp)
vrele(vp);
VOP_ABORTOP(dvp, cnp);
goto out;
}
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
-#endif
+
error = afs_link(VTOAFS(vp), VTOAFS(dvp), name, cnp->cn_cred);
FREE(cnp->cn_pnbuf, M_NAMEI);
if (dvp != vp)
VOP_UNLOCK(vp, 0, curproc);
+
out:
vput(dvp);
DROPNAME();
tname[tcnp->cn_namelen] = '\0';
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
-#endif
/* XXX use "from" or "to" creds? NFS uses "to" creds */
error = afs_rename(VTOAFS(fdvp), fname, VTOAFS(tdvp), tname, tcnp->cn_cred);
#ifdef DIAGNOSTIC
if ((cnp->cn_flags & HASBUF) == 0)
panic("afs_nbsd_mkdir: no name");
-#endif
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
#endif
error = afs_mkdir(VTOAFS(dvp), name, vap, &vcp, cnp->cn_cred);
if (error) {
return (EINVAL);
}
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
-#endif
error = afs_rmdir(VTOAFS(dvp), name, cnp->cn_cred);
DROPNAME();
vput(dvp);
/* NFS ignores a_vpp; so do we. */
GETNAME();
-#ifndef NBSD_WRITES_ALLOWED
- if (!nbsd_writes_allowed)
- error = EROFS;
- if (!error)
-#endif
error = afs_symlink(VTOAFS(dvp), name, ap->a_vap, ap->a_target,
cnp->cn_cred);
DROPNAME();
u_long **a_cookies;
} */ *ap;
{
-/* printf("readdir %p cookies %p ncookies %d\n", ap->a_vp, ap->a_cookies,
- ap->a_ncookies); */
+#ifdef AFS_HAVE_COOKIES
+ printf("readdir %p cookies %p ncookies %d\n", ap->a_vp, ap->a_cookies,
+ ap->a_ncookies);
return afs_readdir(VTOAFS(ap->a_vp), ap->a_uio, ap->a_cred,
ap->a_eofflag, ap->a_ncookies, ap->a_cookies);
+#else
+ return afs_readdir(VTOAFS(ap->a_vp), ap->a_uio, ap->a_cred, ap->a_eofflag);
+#endif
}
int
{
register struct volume *tvp;
register struct cell *tcell;
- register afs_int32 i;
int fakedir = 0;
AFS_STATCNT(afs_CopyOutAttrs);
/* now check the access */
if (treq.uid != adp->last_looker) {
- if (!afs_AccessOK(adp, PRSFS_LOOKUP, &treq, CHECK_MODE_BITS)) {
- *avcp = NULL;
- code = EACCES;
- goto done;
- }
- else adp->last_looker = treq.uid;
+ if (!afs_AccessOK(adp, PRSFS_LOOKUP, &treq, CHECK_MODE_BITS)) {
+ *avcp = NULL;
+ code = EACCES;
+ goto done;
+ }
+ else adp->last_looker = treq.uid;
}
/* Check for read access as well. We need read access in order to
#endif /* linux22 */
}
- {
+ { /* sub-block just to reduce stack usage */
register struct dcache *tdc;
afs_size_t dirOffset, dirLen;
ino_t theDir;
/* now we have to lookup the next fid */
tdc = afs_GetDCache(adp, (afs_size_t) 0, &treq, &dirOffset, &dirLen, 1);
if (!tdc) {
- *avcp = NULL; /* redundant, but harmless */
- code = EIO;
- goto done;
+ *avcp = NULL; /* redundant, but harmless */
+ code = EIO;
+ goto done;
}
/* now we will just call dir package with appropriate inode.
code = afs_dir_LookupOffset(&theDir, sysState.name, &tfid.Fid, &dirCookie);
/* If the first lookup doesn't succeed, maybe it's got @sys in the name */
- while (code == ENOENT && Next_AtSys(adp, &treq, &sysState)) {
- code = afs_dir_LookupOffset(&theDir, sysState.name, &tfid.Fid, &dirCookie);
- }
+ while (code == ENOENT && Next_AtSys(adp, &treq, &sysState))
+ code = afs_dir_LookupOffset(&theDir, sysState.name, &tfid.Fid, &dirCookie);
tname = sysState.name;
ReleaseReadLock(&tdc->lock);
* but hasn't been statd, then do a bulk stat operation.
*/
do {
- retry = 0;
- ObtainReadLock(&afs_xvcache);
- tvc = afs_FindVCache(&tfid, &retry, 0/* !stats,!lru */);
- ReleaseReadLock(&afs_xvcache);
+ retry = 0;
+ ObtainReadLock(&afs_xvcache);
+ tvc = afs_FindVCache(&tfid, &retry, 0 /* !stats,!lru */);
+ ReleaseReadLock(&afs_xvcache);
} while (tvc && retry);
if (!tvc || !(tvc->states & CStatd))
* the file has not yet been looked up.
*/
if (!tvc) {
- afs_int32 cached = 0;
- if (!tfid.Fid.Unique && (adp->states & CForeign)) {
+ afs_int32 cached = 0;
+ if (!tfid.Fid.Unique && (adp->states & CForeign)) {
tvc = afs_LookupVCache(&tfid, &treq, &cached, adp, tname);
- }
- if (!tvc && !bulkcode) { /* lookup failed or wasn't called */
- tvc = afs_GetVCache(&tfid, &treq, &cached, NULL);
- }
+ }
+ if (!tvc && !bulkcode) { /* lookup failed or wasn't called */
+ tvc = afs_GetVCache(&tfid, &treq, &cached, NULL);
+ }
} /* if !tvc */
} /* sub-block just to reduce stack usage */
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
if (!(flags & AFS_LOOKUP_NOEVAL))
- /* don't eval mount points */
+ /* don't eval mount points */
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
if (tvc->mvstat == 1 && force_eval) {
/* a mt point, possibly unevaluated */
/* next, we want to continue using the target of the mt point */
if (tvc->mvid && (tvc->states & CMValid)) {
- struct vcache *uvc;
+ struct vcache *uvc;
/* now lookup target, to set .. pointer */
afs_Trace2(afs_iclSetp, CM_TRACE_LOOKUP1,
ICL_TYPE_POINTER, tvc, ICL_TYPE_FID, &tvc->fid);
#endif /* AFS_OSF_ENV */
if (afs_mariner)
- afs_AddMarinerName(aname, tvc);
+ afs_AddMarinerName(aname, tvc);
#if defined(UKERNEL) && defined(AFS_WEB_ENHANCEMENTS)
if (!(flags & AFS_LOOKUP_NOEVAL))
mount point's vc in the vcache by its fid. */
#endif /* UKERNEL && AFS_WEB_ENHANCEMENTS */
if (!hit) {
- osi_dnlc_enter (adp, aname, tvc, &versionNo);
+ osi_dnlc_enter (adp, aname, tvc, &versionNo);
}
else {
#ifdef AFS_LINUX20_ENV
if (bulkcode) code = bulkcode; else
code = afs_CheckCode(code, &treq, 19);
if (code) {
- /* If there is an error, make sure *avcp is null.
- * Alphas panic otherwise - defect 10719.
- */
- *avcp = NULL;
+ /* If there is an error, make sure *avcp is null.
+ * Alphas panic otherwise - defect 10719.
+ */
+ *avcp = NULL;
}
afs_PutFakeStat(&fakestate);
{
/* Read a page from the disk. */
register struct buffer *tb, *tb2;
- void *tfile;
- register afs_int32 code, *sizep;
+ struct osi_file *tfile;
+ int code;
AFS_STATCNT(DRead);
MObtainWriteLock(&afs_bufferLock,256);
-/* some new code added 1/1/92 */
#define bufmatch(tb) (tb->page == page && dirp_Eq(tb->fid, fid))
#define buf_Front(head,parent,p) {(parent)->hashNext = (p)->hashNext; (p)->hashNext= *(head);*(head)=(p);}
*/
tb = afs_newslot(fid, page, (tb ? tb : tb2));
if (!tb) {
- MReleaseWriteLock(&afs_bufferLock);
- return 0;
+ MReleaseWriteLock(&afs_bufferLock);
+ return 0;
}
MObtainWriteLock(&tb->lock,260);
MReleaseWriteLock(&afs_bufferLock);
tb->lockers++;
tfile = afs_CFileOpen(fid[0]);
- sizep = (afs_int32 *)tfile;
- if (page * AFS_BUFFER_PAGESIZE >= *sizep) {
- dirp_Zap(tb->fid);
- tb->lockers--;
- MReleaseWriteLock(&tb->lock);
- afs_CFileClose(tfile);
- return 0;
- }
code = afs_CFileRead(tfile, tb->page * AFS_BUFFER_PAGESIZE,
tb->data, AFS_BUFFER_PAGESIZE);
afs_CFileClose(tfile);
register afs_int32 i;
afs_int32 lt;
register struct buffer *tp;
- void *tfile;
+ struct osi_file *tfile;
AFS_STATCNT(afs_newslot);
/* we take a pointer here to a buffer which was at the end of an
/* Flush all the modified buffers. */
register int i;
register struct buffer *tb;
- void *tfile;
+ struct osi_file *tfile;
AFS_STATCNT(DFlush);
tb = Buffers;
struct dcache *tdc;
struct VenusFid *afid;
- afs_int32 i, j, k;
+ afs_int32 i, j;
afs_hyper_t vtime;
int skip, phase;
register struct vcache *tvc;
i = DCHash(&avc->fid, chunk);
MObtainWriteLock(&afs_xdcache,278);
for(index = afs_dchashTbl[i]; index != NULLIDX;) {
- if (afs_indexUnique[index] == avc->fid.Fid.Unique) {
- tdc = afs_GetDSlot(index, NULL);
- ReleaseReadLock(&tdc->tlock);
- if (!FidCmp(&tdc->f.fid, &avc->fid) && chunk == tdc->f.chunk) {
- break; /* leaving refCount high for caller */
+ if (afs_indexUnique[index] == avc->fid.Fid.Unique) {
+ tdc = afs_GetDSlot(index, NULL);
+ ReleaseReadLock(&tdc->tlock);
+ if (!FidCmp(&tdc->f.fid, &avc->fid) && chunk == tdc->f.chunk) {
+ break; /* leaving refCount high for caller */
+ }
+ afs_PutDCache(tdc);
}
- afs_PutDCache(tdc);
- }
- index = afs_dcnextTbl[index];
+ index = afs_dcnextTbl[index];
}
MReleaseWriteLock(&afs_xdcache);
if (index != NULLIDX) {
* programs (without setpag) to work properly.
*/
#if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- av->uid = acred->cr_uid; /* default when no pag is set */
- /* bsd creds don't have ruid */
+ if (acred == NOCRED)
+ av->uid = -2; /* XXX nobody... ?*/
+ else
+ av->uid = acred->cr_uid; /* bsd creds don't have ruid */
#else
av->uid = acred->cr_ruid; /* default when no pag is set */
#endif
code = afs_HandlePioctl(vp, com, &data, follow, &credp);
#else
#ifdef AFS_AIX41_ENV
- {
- struct ucred *cred1, *cred2;
+ {
+ struct ucred *cred1, *cred2;
- if (foreigncreds) {
- cred1 = cred2 = foreigncreds;
- } else {
- cred1 = cred2 = credp;
- }
- code = afs_HandlePioctl(vp, com, &data, follow, &cred1);
- if (cred1 != cred2) {
- /* something changed the creds */
- crset(cred1);
+ if (foreigncreds) {
+ cred1 = cred2 = foreigncreds;
+ } else {
+ cred1 = cred2 = credp;
+ }
+ code = afs_HandlePioctl(vp, com, &data, follow, &cred1);
+ if (cred1 != cred2) {
+ /* something changed the creds */
+ crset(cred1);
+ }
}
- }
#else
#if defined(AFS_HPUX101_ENV)
- {
- struct ucred *cred = p_cred(u.u_procp);
- code = afs_HandlePioctl(vp, com, &data, follow, &cred);
- }
+ {
+ struct ucred *cred = p_cred(u.u_procp);
+ code = afs_HandlePioctl(vp, com, &data, follow, &cred);
+ }
#else
#ifdef AFS_SGI_ENV
- {
- struct cred *credp;
- credp = OSI_GET_CURRENT_CRED();
- code = afs_HandlePioctl(vp, com, &data, follow, &credp);
- }
+ {
+ struct cred *credp;
+ credp = OSI_GET_CURRENT_CRED();
+ code = afs_HandlePioctl(vp, com, &data, follow, &credp);
+ }
#else
#if defined(AFS_LINUX22_ENV) || defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
- code = afs_HandlePioctl(vp, com, &data, follow, &credp);
+ code = afs_HandlePioctl(vp ? VTOAFS(vp) : NULL, com, &data, follow, &credp);
#else
code = afs_HandlePioctl(vp, com, &data, follow, &u.u_cred);
#endif
extern char *osi_AllocSmall(register afs_int32 size, register afs_int32 morespace);
#endif
+/* afs_osi_uio.c */
+extern int afsio_copy(struct uio *ainuio, struct uio *aoutuio, struct iovec *aoutvec);
+extern int afsio_trim(struct uio *auio, afs_int32 asize);
+extern int afsio_skip(struct uio *auio, afs_int32 asize);
+
/* ARCH/osi_misc.c */
#ifdef AFS_LINUX20_ENV
#include "h/socket.h"
#endif
+#ifndef AFS_OBSD_ENV
#include "netinet/in.h"
+#endif
#else /* !UKERNEL */
#include "afs/sysincludes.h"
#endif /* !UKERNEL */
#ifndef KERNEL
#define osi_Time() time(0)
#endif
-struct rxkad_stats rxkad_stats = {0};
+struct rxkad_stats rxkad_stats;
/* static prototypes */
static afs_int32 ComputeSum(struct rx_packet *apacket,