--- lib/fs.c.orig 2007-05-25 18:20:56.000000000 +0200 +++ lib/fs.c 2007-05-25 18:21:17.000000000 +0200 @@ -56,7 +56,7 @@ * There is NO mntctl prototype in any header file of AIX 3.2.5! * So we have to declare it by ourself... */ -int mntctl(int command, int size, char *buffer); +/*int mntctl(int command, int size, char *buffer);*/ /** * Get information for mounted file systems. --- tools/rpmmtree.c.orig 2008-09-11 20:14:55.000000000 +0200 +++ tools/rpmmtree.c 2008-09-11 20:29:28.000000000 +0200 @@ -44,7 +44,7 @@ #include #if !defined(HAVE_ASPRINTF) -#include "asprintf.h" +#include "misc/asprintf.h" #endif #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__DragonFly__) || defined(__APPLE__) @@ -57,7 +57,7 @@ #define st_mtimespec st_mtim #endif -#if defined(__QNXNTO__) +#if defined(__QNXNTO__) || defined( _AIX ) #define st_mtimespec st_mtime #endif @@ -1015,7 +1019,7 @@ /*==============================================================*/ /* XXX *BSD systems already have getmode(3) and setmode(3) */ -#if defined(__linux__) || defined(__LCLINT__) || defined(__QNXNTO__) +#if defined(__linux__) || defined( _AIX ) || defined(__LCLINT__) || defined(__QNXNTO__) #if !defined(HAVE_GETMODE) || !defined(HAVE_SETMODE) #define SET_LEN 6 /* initial # of bitcmd struct to malloc */ --- lib/rpmrc.c.orig 2008-09-11 17:46:30.000000000 +0200 +++ lib/rpmrc.c 2008-09-11 17:51:29.000000000 +0200 @@ -576,6 +576,11 @@ sprintf(un.machine, "ppc"); } + if (!strcmp(un.sysname, "AIX")) { + strcpy(un.machine, __power_pc() ? "ppc" : "rs6000"); + sprintf(un.sysname,"aix%s.%s", un.version, un.release); + } + #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */ /* allow the path to the "platforms" file be overridden under run-time */ cp = rpmExpand("%{?__platform}", NULL);