illumos doesn't support netstat -l.
--- gnutls-3.8.1/tests/scripts/common.sh.orig
+++ gnutls-3.8.1/tests/scripts/common.sh
@@ -79,7 +79,7 @@
 check_if_port_listening() {
 	local PORT=$1
 	have_port_finder
-	$PFCMD -anl|grep "[\:\.]$PORT"|grep LISTEN >/dev/null 2>&1
+	$PFCMD -an|grep "[\:\.]$PORT"|grep LISTEN >/dev/null 2>&1
 }
 
 # Find a port number not currently in use.