Index: src/afs/afs_pioctl.c
===================================================================
RCS file: /cvs/openafs/src/afs/afs_pioctl.c,v
retrieving revision 1.121
diff -c -r1.121 afs_pioctl.c
*** src/afs/afs_pioctl.c	4 Jan 2008 17:39:05 -0000	1.121
--- src/afs/afs_pioctl.c	1 Mar 2008 12:07:35 -0000
***************
*** 885,892 ****
  #if defined(AFS_SUN510_ENV)
      if (vp && !IsAfsVnode(vp)) {
  	struct vnode *realvp;
! 	
  	if (VOP_REALVP(vp, &realvp) == 0) {
  	    struct vnode *oldvp = vp;
  	    
  	    VN_HOLD(realvp);
--- 885,896 ----
  #if defined(AFS_SUN510_ENV)
      if (vp && !IsAfsVnode(vp)) {
  	struct vnode *realvp;
! 
! #ifdef AFS_SUN511_ENV
! 	if (VOP_REALVP(vp, &realvp,NULL) == 0) {
! #else
  	if (VOP_REALVP(vp, &realvp) == 0) {
+ #endif
  	    struct vnode *oldvp = vp;
  	    
  	    VN_HOLD(realvp);
Index: src/afs/SOLARIS/osi_file.c
===================================================================
RCS file: /cvs/openafs/src/afs/SOLARIS/osi_file.c,v
retrieving revision 1.15
diff -c -r1.15 osi_file.c
*** src/afs/SOLARIS/osi_file.c	13 Dec 2007 19:18:10 -0000	1.15
--- src/afs/SOLARIS/osi_file.c	1 Mar 2008 12:07:35 -0000
***************
*** 86,92 ****
--- 86,96 ----
      struct vattr vattr;
  
      vattr.va_mask = AT_FSID | AT_NODEID;	/* quick return using this mask. */
+ #ifdef AFS_SUN511_ENV
+     code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred,NULL);
+ #else
      code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+ #endif
      if (code) {
  	osi_Panic("VnodeToIno");
      }
***************
*** 101,107 ****
--- 105,115 ----
  
      vattr.va_mask = AT_FSID | AT_NODEID;	/* quick return using this mask. */
      AFS_GUNLOCK();
+ #ifdef AFS_SUN511_ENV
+     code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred,NULL);
+ #else
      code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+ #endif
      AFS_GLOCK();
      if (code) {
  	osi_Panic("VnodeToDev");
***************
*** 122,128 ****
--- 130,140 ----
      MObtainWriteLock(&afs_xosi, 578);
      vattr.va_mask = AT_SIZE;
      AFS_GUNLOCK();
+ #ifdef AFS_SUN511_ENV
+     code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred,NULL);
+ #else
      code = VOP_GETATTR(vp, &vattr, 0, &afs_osi_cred);
+ #endif
      AFS_GLOCK();
      if (code) {
  	osi_Panic("VnodeToSize");
***************
*** 224,230 ****
--- 236,246 ----
      /* Ufs doesn't seem to care about the flags so we pass 0 for now */
      tvattr.va_mask = AT_ALL;
      AFS_GUNLOCK();
+ #ifdef AFS_SUN511_ENV 
+     code = VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred,NULL);
+ #else
      code = VOP_GETATTR(afile->vnode, &tvattr, 0, &afs_osi_cred);
+ #endif
      AFS_GLOCK();
      if (code == 0) {
  	astat->size = tvattr.va_size;
Index: src/afs/SOLARIS/osi_vfsops.c
===================================================================
RCS file: /cvs/openafs/src/afs/SOLARIS/osi_vfsops.c,v
retrieving revision 1.23
diff -c -r1.23 osi_vfsops.c
*** src/afs/SOLARIS/osi_vfsops.c	21 Jan 2008 17:34:00 -0000	1.23
--- src/afs/SOLARIS/osi_vfsops.c	1 Mar 2008 12:07:35 -0000
***************
*** 417,428 ****
--- 417,438 ----
  }
  
  #ifdef AFS_SUN510_ENV
+ #ifdef AFS_SUN511_ENV
+ static struct vfsdef_v4 afs_vfsdef = {
+     VFSDEF_VERSION,
+     "afs",
+     afsinit,
+     0,
+     NULL
+ };
+ #else
  static struct vfsdef_v3 afs_vfsdef = {
      VFSDEF_VERSION,
      "afs",
      afsinit,
      0
  };
+ #endif
  #else
  static struct vfssw afs_vfw = {
      "afs",
Index: src/afs/SOLARIS/osi_vnodeops.c
===================================================================
RCS file: /cvs/openafs/src/afs/SOLARIS/osi_vnodeops.c,v
retrieving revision 1.31
diff -c -r1.31 osi_vnodeops.c
*** src/afs/SOLARIS/osi_vnodeops.c	1 Nov 2007 16:57:26 -0000	1.31
--- src/afs/SOLARIS/osi_vnodeops.c	1 Mar 2008 12:07:35 -0000
***************
*** 1404,1409 ****
--- 1404,1443 ----
  }
  
  #ifdef	AFS_SUN54_ENV
+ #ifdef	AFS_SUN511_ENV
+ extern void
+ afs_dispose(vp, p, fl, dn, cr,ct)
+      struct vnode *vp;
+      struct page *p;
+      int fl, dn;
+      struct cred *cr;
+      struct caller_context_t *ct;
+ {
+     fs_dispose(vp, p, fl, dn, cr,ct);
+ }
+ 
+ int
+ afs_setsecattr(vp, vsecattr, flag, creds,ct)
+      struct vnode *vp;
+      vsecattr_t *vsecattr;
+      int flag;
+      struct cred *creds;
+      struct caller_context_t *ct;
+ {
+     return ENOSYS;
+ }
+ 
+ int
+ afs_getsecattr(vp, vsecattr, flag, creds,ct)
+      struct vnode *vp;
+      vsecattr_t *vsecattr;
+      int flag;
+      struct cred *creds;
+      struct caller_context_t *ct;
+ {
+   return fs_fab_acl(vp, vsecattr, flag, creds,ct);
+ }
+ #else
  extern void
  afs_dispose(vp, p, fl, dn, cr)
       struct vnode *vp;
***************
*** 1434,1439 ****
--- 1468,1474 ----
      return fs_fab_acl(vp, vsecattr, flag, creds);
  }
  #endif
+ #endif
  
  #ifdef	AFS_GLOBAL_SUNLOCK
  extern int gafs_open(), gafs_close(), afs_ioctl(), gafs_access();
Index: src/rx/SOLARIS/rx_knet.c
===================================================================
RCS file: /cvs/openafs/src/rx/SOLARIS/rx_knet.c,v
retrieving revision 1.26
diff -c -r1.26 rx_knet.c
*** src/rx/SOLARIS/rx_knet.c	30 Jan 2008 21:04:06 -0000	1.26
--- src/rx/SOLARIS/rx_knet.c	1 Mar 2008 12:07:36 -0000
***************
*** 444,450 ****
--- 444,454 ----
  
      /* Was sockfs_sounbind(so, 0); sockfs_sockfree(so); That's wrong */
      vp = SOTOV(so);
+  #ifdef AFS_SUN511_ENV
+     VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED(),NULL);
+  #else
      VOP_CLOSE(vp, FREAD|FWRITE, 1, (offset_t)0, CRED());
+  #endif
      VN_RELE(vp);
  
      return 0;
