Index: Configure
--- Configure.orig	2008-04-15 15:24:36 +0200
+++ Configure	2008-04-16 08:19:20 +0200
@@ -417,7 +417,7 @@
       fi	# }
     fi	# }
     LSOF_TGT="aix"
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0	# {
     then
 
@@ -571,7 +571,7 @@
 
 	    rm -f dialects/aix/aix5/j2/j2_snapshot.h
 	  fi	# }
-	  echo $LSOF_CC | grep gcc > /dev/null
+	  $LSOF_CC --version | grep GCC > /dev/null
 	  if test $? -eq 0	# {
 	  then
 
@@ -609,7 +609,7 @@
       # This is AIX >= 5 on ia64.
 
 	LSOF_TSTK64=1
-	echo $LSOF_CC | grep gcc > /dev/null
+	$LSOF_CC --version | grep GCC > /dev/null
 	if test $? -eq 0	# {
 	then
 
@@ -686,7 +686,7 @@
 	  fi	# }
 	  LSOF_TSTK64=1
 	  LSOF_TMP1=1
-	  echo $LSOF_CC | grep gcc > /dev/null
+	  $LSOF_CC --version | grep GCC > /dev/null
 	  if test $? -eq 0	# {
 	  then
 	    LSOF_CFGF="$LSOF_CFGF -maix64"
@@ -733,7 +733,7 @@
     fi	#}
     LSOF_CFGF="$LSOF_CFGF -DAIXV=$LSOF_VERS"
     LSOF_DIALECT_DIR=aix
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0 	# {
     then
 
@@ -2134,7 +2134,7 @@
 	fi	# }
       fi	# }
     fi	# }
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0	# {
     then
       LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
@@ -2188,7 +2188,7 @@
       then
 	LSOF_CFGF="$LSOF_CFGF -Ae +DD32"
       else
-	echo $LSOF_CC | grep -q gcc
+	$LSOF_CC --version | grep -q GCC
 	if test $? -ne 0	# {
 	then
 	  LSOF_CFGF="$LSOF_CFGF +DD32"
@@ -2272,7 +2272,7 @@
 	    echo "* NOTICE!  Configuring for 64 bit HP-UX *"
 	    echo "*                                       *"
 	    echo "*****************************************"
-	    echo $LSOF_CC | grep gcc > /dev/null
+	    $LSOF_CC --version | grep GCC > /dev/null
 	    if test $? -eq 0	# {
 	    then
 
@@ -2341,7 +2341,7 @@
 	  else
 	    LSOF_CFGF="$LSOF_CFGF -D_FILE_OFFSET_BITS=64"
 	    LSOF_CINFO="${LSOF_CINFO}, 32 bit HP-UX"
-	    echo $LSOF_CC | grep gcc > /dev/null
+	    $LSOF_CC --version | grep GCC > /dev/null
 	    if test $? -ne 0	# {
 	    then
 	      LSOF_CFGF="$LSOF_CFGF +DAportable"
@@ -3550,7 +3550,7 @@
 	LSOF_CCV=`$LSOF_CC -v 2>&1 | sed -n 's/.*version \(.*\)/\1/p'`
       fi	# }
     fi	# }
-    echo $LSOF_CC | grep gcc > /dev/null
+    $LSOF_CC --version | grep GCC > /dev/null
     if test $? -eq 0	# {
     then
       LSOF_CFGL="-w"
@@ -4187,6 +4187,17 @@
 	LSOF_TSTBIGF=" "
 	LSOF_TSTLFLG="-lsocket -lnsl"
 	LSOF_VERS="100000"
+ 	if [ ".`isainfo -k`" = .amd64 ]; then
+ 	    LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil"
+ 	fi
+	;;
+      5.11*)
+	LSOF_TSTBIGF=" "
+	LSOF_TSTLFLG="-lsocket -lnsl"
+	LSOF_VERS="110000"
+ 	if [ ".`isainfo -k`" = .amd64 ]; then
+ 	    LSOF_CFGL="$LSOF_CFGL -lmp -lmd5 -lscf -ldoor -luutil"
+ 	fi
 	;;
       *)
 	echo Unknown Solaris version: $LSOF_VSTR
@@ -4264,7 +4275,7 @@
       ;;
     20500|20501)
       ;;
-    20600|70000|80000|90000|100000)
+    20600|70000|80000|90000|100000|110000)
       if test "X$SOLARIS_26PR_GWINDOWS" = "X"	# {
       then
 	rm -f ${LSOF_TMPC}.*
@@ -4273,7 +4284,7 @@
 	echo "main(){" >> ${LSOF_TMPC}.c
 	echo "enum prnodetype p=PR_GWINDOWS;}" >> ${LSOF_TMPC}.c
 	echo "Testing prdata.h for PR_GWINDOWS, using $LSOF_CC"
-	echo $LSOF_CC | grep gcc > /dev/null
+	$LSOF_CC --version | grep GCC > /dev/null
 	if test $? -eq 0	# {
 	then
 	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x  > /dev/null 2>&1
@@ -4298,7 +4309,7 @@
 	echo "main(){" >> ${LSOF_TMPC}.c
 	echo "enum prnodetype p=PR_LDT;}" >> ${LSOF_TMPC}.c
 	echo "Testing prdata.h for PR_LDT, using $LSOF_CC"
-	echo $LSOF_CC | grep gcc > /dev/null
+	$LSOF_CC --version | grep GCC > /dev/null
 	if test $? -eq 0	# {
 	then
 	  $LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
@@ -4328,7 +4339,7 @@
 	echo $SOLARIS_KERNBITS | grep 64 > /dev/null
 	if test $? -eq 0	# {
 	then
-	  echo $LSOF_CC | grep gcc > /dev/null
+	  $LSOF_CC --version | grep GCC > /dev/null
 	  if test $? -eq 0	# {
 	  then
 
@@ -4532,7 +4543,7 @@
 
       # Check for Solaris 10 or higher ZFS.
 
-      if test -r ${LSOF_INCLUDE}/sys/fs/zfs.h	# {
+      if false	# {
       then
 	LSOF_TMP1="dmu.h zfs_acl.h zfs_debug.h zfs_rlock.h zil.h spa.h zfs_context.h zfs_dir.h zfs_vfsops.h zio.h txg.h zfs_ctldir.h zfs_ioctl.h zfs_znode.h zio_impl.h"
 	LSOF_TMP2=""
@@ -4615,7 +4626,7 @@
       echo "main(){" >> ${LSOF_TMPC}.c
       echo "enum vtype p=VSOCK;}" >> ${LSOF_TMPC}.c
       echo "Testing vnode.h for VSOCK, using $LSOF_CC"
-      echo $LSOF_CC | grep gcc > /dev/null
+      $LSOF_CC --version | grep GCC > /dev/null
       if test $? -eq 0	# {
       then
 	$LSOF_CC ${LSOF_TMPC}.c -o ${LSOF_TMPC}.x > /dev/null 2>&1
@@ -5295,7 +5306,7 @@
     echo "$i" >> $LSOF_TSTCFLG
   done	# }
 fi	# }
-echo $LSOF_CC | grep gcc > /dev/null 2>&1
+$LSOF_CC --version | grep GCC > /dev/null 2>&1
 if test $? -eq 0	# {
 then
   echo "-DLT_GCC" >> $LSOF_TSTCFLG
Index: dialects/sun/dnode.c
--- dialects/sun/dnode.c.orig	2008-10-21 18:16:45.000000000 +0200
+++ dialects/sun/dnode.c	2009-01-08 01:59:20.609120000 +0100
@@ -85,6 +85,8 @@
 #define	LOOKDEV_ALL	(LOOKDEV_TAB | LOOKDEV_CLONE | LOOKDEV_PSEUDO)
 					/* look all places */
 
+#define NOOP ((void)0)
+
 
 /*
  * SAM-FS definitions
@@ -2065,7 +2067,9 @@
 	    if (kvs && kv.vfs_data
 	    && !kread((KA_T)kv.vfs_data, (char *)&pcfs, sizeof(pcfs))) {
 
-#if	solaris>=70000
+#if	solaris>=110000  /* pcfs_entps doesn't exist any more */
+		NOOP;
+#elif	solaris>=70000
 		Lf->inode = (INODETYPE)pc_makenodeid(pc.pc_eblkno,
 			    pc.pc_eoffset,
 			    pc.pc_entry.pcd_attr,
@@ -2079,7 +2083,7 @@
 			    pc.pc_eoffset,
 			    &pc.pc_entry,
 			    pcfs.pcfs_entps);
-#endif	/* solaris>=70000 */
+#endif	/* solaris>=110000 */
 
 		Lf->inp_ty = 1;
 	    }
Index: dialects/freebsd/machine.h
--- dialects/freebsd/machine.h.orig	2006-03-28 01:29:14 +0200
+++ dialects/freebsd/machine.h	2008-04-16 08:17:46 +0200
@@ -441,6 +441,11 @@
  */
 
 /* #define	HASSECURITY	1 */
+#if    FREEBSDV>=6000
+#define        HASSECURITY     1
+#define        HAS_SI_PRIV     1
+#endif /* FREEBSDV>=6000 */
+
 
 
 /*
Index: dialects/sun/machine.h
--- dialects/sun/machine.h.orig	2007-04-24 18:23:25 +0200
+++ dialects/sun/machine.h	2008-04-16 08:17:46 +0200
@@ -75,6 +75,7 @@
 #include <sys/poll.h>
 
 # if	solaris>=80000
+#include <sys/types32.h>
 #include <sys/wait.h>
 #include <sys/types32.h>
 #define	_KERNEL	1
Index: proc.c
--- proc.c.orig	2008-10-21 18:22:05.000000000 +0200
+++ proc.c	2009-01-08 01:13:31.388963909 +0100
@@ -841,8 +841,6 @@
 {
 	if (Lf->sf & SELEXCLF)
 	    return;
-	if (((Selflags & SELNET) == SELNET) && !(Lf->sf & SELNET))
-	    return;
 	Lp->pss |= PS_SEC;
 	if (Plf)
 	    Plf->next = Lf;
