Index: Configure
diff -Nau Configure.orig Configure
--- Configure.orig	2009-03-25 20:24:01.000000000 +0100
+++ Configure	2009-04-01 18:03:19.553379145 +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
 
@@ -2193,7 +2193,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'`
@@ -2247,7 +2247,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"
@@ -2331,7 +2331,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
 
@@ -2400,7 +2400,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"
@@ -3609,7 +3609,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"
@@ -4246,6 +4246,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
@@ -4323,7 +4334,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}.*
@@ -4332,7 +4343,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
@@ -4357,7 +4368,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
@@ -4391,7 +4402,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
 
@@ -4597,7 +4608,7 @@
 
       # Check for Solaris 10 or higher ZFS.
 
-      if test -r ${LSOF_INCLUDE}/sys/fs/zfs.h	# {
+      if false	# {
       then
 
       # Check for required ZFS kernel header files.
@@ -4712,7 +4723,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
@@ -5398,7 +5409,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/freebsd/machine.h
diff -Nau dialects/freebsd/machine.h.orig dialects/freebsd/machine.h
--- dialects/freebsd/machine.h.orig	2008-10-21 18:16:15.000000000 +0200
+++ dialects/freebsd/machine.h	2009-04-01 18:07:54.041381807 +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/dnode.c
diff -Nau dialects/sun/dnode.c.orig dialects/sun/dnode.c
--- dialects/sun/dnode.c.orig	2009-03-25 20:22:21.000000000 +0100
+++ dialects/sun/dnode.c	2009-04-01 18:07:54.041381807 +0200
@@ -92,6 +92,8 @@
 #define	LOOKDEV_ALL	(LOOKDEV_TAB | LOOKDEV_CLONE | LOOKDEV_PSEUDO)
 					/* look all places */
 
+#define NOOP ((void)0)
+
 
 /*
  * SAM-FS definitions
@@ -2078,7 +2080,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,
@@ -2092,7 +2096,7 @@
 			    pc.pc_eoffset,
 			    &pc.pc_entry,
 			    pcfs.pcfs_entps);
-#endif	/* solaris>=70000 */
+#endif	/* solaris>=110000 */
 
 		Lf->inp_ty = 1;
 	    }
