$NetBSD$

--- src/glob.c.orig	2001-11-29 17:01:38.000000000 +0000
+++ src/glob.c
@@ -88,7 +88,6 @@ char **blkcpy(char **, register char **)
 
 char *globerr;
 char *home;
-extern int errno;
 
 static int globcnt;
 
@@ -437,6 +436,8 @@ static int amatch(char *s, char *p)
 	    continue;
 
 	case '*':
+	    while (*p == '*')
+		p++;
 	    if (!*p)
 		return (1);
 	    if (*p == '/') {
