---- rpm-4.4.1/configure.ac.orig 2005-07-15 20:06:31.000000000 +0000
-+++ rpm-4.4.1/configure.ac 2005-07-15 20:22:45.000000000 +0000
-@@ -619,7 +619,6 @@
- dnl popt w float/double needs.
- AC_CHECK_HEADERS(float.h)
+--- rpm-5.1.4/rpmio/rpmrpc.c.org 2008-07-29 21:27:42.203871384 +0200
++++ rpm-5.1.4/rpmio/rpmrpc.c 2008-07-29 21:27:58.080756454 +0200
+@@ -1757,14 +1757,14 @@
+ return -2;
+ /*@notreached@*/ break;
+ }
+- return glob(pattern, flags, errfunc, pglob);
++ return rpm_glob(pattern, flags, errfunc, pglob);
+ }
--AC_CHECK_HEADERS(glob.h)
-
- dnl statfs portability fiddles.
- dnl
-@@ -843,10 +842,10 @@
- dnl XXX Glob is "fixed" in glibc-2.3.3-61, but the cost is that
- dnl dangling symlinks are no longer globbed. Always use the internal glob.
- dnl
--#AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ],
--# [rpm_cv_glob=yes],
--# [AC_CHECK_FUNCS(glob, rpm_cv_glob=no, rpm_cv_glob=yes)])
--#
-+AC_ARG_WITH(glob, [ --with-glob use the internal GNU glob ],
-+ [rpm_cv_glob=yes],
-+ [AC_CHECK_FUNCS(glob, rpm_cv_glob=no, rpm_cv_glob=yes)])
-+
- #if test $rpm_cv_glob = no ; then
- # AC_CACHE_CHECK([for GNU extensions to glob], rpm_cv_glob_ext, [
- # rm -f t
-@@ -870,11 +869,11 @@
- # fi
- #fi
- #
--#if test "$rpm_cv_glob" = yes; then
-+if test "$rpm_cv_glob" = yes; then
- AC_DEFINE(USE_GNU_GLOB, 1, [Use the included glob.c?])
- AC_LIBOBJ(glob)
- AC_LIBOBJ(fnmatch)
--#fi
-+fi
- dnl
- dnl Auto-detect which python bindings should be built.
- dnl
---- rpm-4.4.1/misc/glob.c.orig 2005-01-28 06:19:54.000000000 +0000
-+++ rpm-4.4.1/misc/glob.c 2005-07-15 20:35:31.000000000 +0000
-@@ -130,7 +130,7 @@
- If memory cannot be allocated for PGLOB, GLOB_NOSPACE is returned.
- Otherwise, `glob' returns zero. */
- int
--glob (const char *pattern, int flags,
-+rpm_glob (const char *pattern, int flags,
- int (*errfunc) __P ((const char *, int)), glob_t *pglob)
+ void Globfree(glob_t *pglob)
{
- const char *filename;
-@@ -831,7 +831,7 @@
+ if (_rpmio_debug)
+ fprintf(stderr, "*** Globfree(%p)\n", pglob);
+- globfree(pglob);
++ rpm_globfree(pglob);
+ }
- /* Free storage allocated in PGLOB by a previous `glob' call. */
- void
--globfree (glob_t *pglob)
-+rpm_globfree (glob_t *pglob)
- {
- if (pglob->gl_pathv != NULL)
- {
+ DIR * Opendir(const char * path)
+--- rpm-5.1.4/misc/librpmmisc.c.org 2008-07-29 21:26:19.710540550 +0200
++++ rpm-5.1.4/misc/librpmmisc.c 2008-07-29 21:27:25.357426308 +0200
+@@ -71,7 +71,11 @@
+ #include "fnmatch.h"
+ #include "fnmatch.c"
+ #ifndef __CYGWIN__
++#define glob rpm_glob
++#define globfree rpm_globfree
+ #include "glob.h"
+ #include "glob.c"
++#undef glob
++#undef globfree
+ #endif
+
+--- rpm/misc/librpmmisc.vers~ 2007-11-13 03:16:23.000000000 +0100
++++ rpm/misc/librpmmisc.vers 2008-07-29 21:32:35.023645681 +0200
+@@ -7,8 +7,10 @@
+ db_strerror_rpmdb;
+ db_create_rpmdb;
+ fnmatch;
+- glob;
+- globfree;
++ rpm_glob;
++ rpm_glob64;
++ rpm_globfree;
++ rpm_globfree64;
+ lua*;
+ magic_*;
+ rpmz_*;