1--- src/Makefile.in.orig	2008-08-06 18:55:57.000000000 -0700
2+++ src/Makefile.in	2008-08-06 18:56:04.000000000 -0700
3@@ -47,7 +47,7 @@
4 
5 # glob.c does not have prototypes
6 glob.o: glob.c ndir.h
7-	$(CC) -c $(CWARNNP) $(CFLAGS) -I. $(DEFS) glob.c
8+	$(CC) -c $(CWARNNP) $(CFLAGS) $(DEFS) glob.c
9 
10 man-config.o man-getopt.o man.o manpath.o to_cat.o: defs.h
11 different.o man.o: different.h
12--- src/glob.c.orig	2008-08-06 18:41:39.000000000 -0700
13+++ src/glob.c	2008-08-06 18:58:17.000000000 -0700
14@@ -1,3 +1,27 @@
15+#ifdef __APPLE__
16+#include <glob.h>
17+#include <stdlib.h>
18+#include <string.h>
19+
20+char **
21+glob_filename (const char *pathname)
22+{
23+	char **result = NULL;
24+	glob_t g;
25+	int i;
26+
27+	if (glob(pathname, 0, NULL, &g) == 0) {
28+		result = malloc((g.gl_pathc + 1) * sizeof(char *));
29+		for (i = 0; i < g.gl_pathc; i++) {
30+			result[i] = strdup(g.gl_pathv[i]);
31+		}
32+		result[g.gl_pathc] = NULL;
33+		globfree(&g);
34+	}
35+
36+	return result;
37+}
38+#else
39 /* File-name wildcard pattern matching for GNU.
40    Copyright (C) 1985, 1988, 1989, 1990, 1991 Free Software Foundation, Inc.
41 
42@@ -680,3 +704,4 @@
43 }
44 
45 #endif /* TEST */
46+#endif
47