--- zdiff.in.orig	Sun Dec 24 04:14:57 2006
+++ zdiff.in	Tue Jan  2 14:06:51 2007
@@ -65,7 +65,7 @@
 		*[-.]gz* | *[-.][zZ] | *.t[ga]z | -)
 		    if test "$1$2" = --; then
 			gzip -cdfq - | eval "$cmp" - -
-		    elif test -r /dev/fd/3 3</dev/null; then
+		    elif test -d /dev/fd -a -r /dev/fd/3 3</dev/null; then
 			gzip -cdfq -- "$1" |
 			  (gzip -cdfq -- "$2" |
 			   eval "$cmp" /dev/fd/3 -) 3<&0
