[Rpm-maint] RPM on Leopard...[PATCH]

Giulio Eulisse Giulio.Eulisse at cern.ch
Mon Dec 3 09:31:55 UTC 2007

I've a few patches that are required to us to get rpm working
(including rpmbuild) on leopard, intel. I thought you might have been
The first one is actually an old problem, which does not seem to have
been integrated (not in at least) yet.
The second one is a missing "i386" in find-provides, which I think can
go in as it is.
The third one is due to the fact that leopard actually has a working
stat64 API and there is no need to have a #define for it. I guess this
should be taken care of in "./configure" though.


diff --git a/rpmio/fts.h b/rpmio/fts.h
index eaa4a8b..da5f646 100644
--- a/rpmio/fts.h
+++ b/rpmio/fts.h
@@ -56,7 +56,7 @@

 #if defined(__APPLE__)
-# define _D_EXACT_NAMLEN(d) ((d)->d_reclen)
+# define _D_EXACT_NAMLEN(d) (strlen((d)->d_name))

diff --git a/find-provides b/find-provides
index 5064414..b068912 100755
--- a/find-provides
+++ b/find-provides
@@ -5,7 +5,7 @@
 # This script reads filenames from STDIN and outputs any relevant provides
 # information that needs to be included in the package.

-filelist=$(sed -n -e '/\.dylib/p' -e '/\.so/p' -e '/\.bundle/p' |
sort | uniq | xargs file -L 2>/dev/null | grep "Mach-O.*ppc" | cut -d:
+filelist=$(sed -n -e '/\.dylib/p' -e '/\.so/p' -e '/\.bundle/p' |
sort | uniq | xargs file -L 2>/dev/null | grep "Mach-O.*\(ppc\|i386\)"
| cut -d: -f1)

 for f in $filelist; do
     libname=$(basename $f | sed -e 's;\..*;;')
diff --git a/rpmio/fts.c b/rpmio/fts.c
index 4ce33fe..6375ad7 100644
--- a/rpmio/fts.c
+++ b/rpmio/fts.c
@@ -61,9 +61,7 @@ static char sccsid[] = "@(#)fts.c	8.6 (Berkeley) 8/14/94";
 #if defined(__APPLE__)
 #   define __errno_location()	(__error())
-#   define stat64		stat
 #   define _STAT_VER		0
-#   define __fxstat64(_stat_ver, _fd, _sbp)	fstat((_fd), (_sbp))
 #include "system.h"
 #include "fts.h"


More information about the Rpm-maint mailing list