From bce9503f5c14a39d190bba3be1327d50349e031d Mon Sep 17 00:00:00 2001
From: Uli Link
Date: Mon, 15 Mar 2010 14:43:16 +1300
Subject: [PATCH] Bug 526457. Fix AIX compilation. r=bsmedberg
---
other-licenses/bsdiff/bsdiff.c | 10 ++++++----
xpcom/io/nsLocalFileUnix.h | 5 +++++
2 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/other-licenses/bsdiff/bsdiff.c b/other-licenses/bsdiff/bsdiff.c
index 179b70c6300c..0af64b299c43 100644
--- a/other-licenses/bsdiff/bsdiff.c
+++ b/other-licenses/bsdiff/bsdiff.c
@@ -35,10 +35,11 @@
#undef MIN
#define MIN(x,y) (((x)<(y)) ? (x) : (y))
-//-----------------------------------------------------------------------------
+/*---------------------------------------------------------------------------*/
-// This variable lives in libbz2. It's declared in bzlib_private.h, so we just
-// declare it here to avoid including that entire header file.
+/* This variable lives in libbz2. It's declared in bzlib_private.h, so we just
+ * declare it here to avoid including that entire header file.
+ */
extern unsigned int BZ2_crc32Table[256];
static unsigned int
@@ -54,7 +55,7 @@ crc32(const unsigned char *buf, unsigned int len)
return crc;
}
-//-----------------------------------------------------------------------------
+/*---------------------------------------------------------------------------*/
static void
reporterr(int e, const char *fmt, ...)
@@ -400,3 +401,4 @@ int main(int argc,char *argv[])
return 0;
}
+
diff --git a/xpcom/io/nsLocalFileUnix.h b/xpcom/io/nsLocalFileUnix.h
index 4464c0ed221e..be8df011f9d2 100644
--- a/xpcom/io/nsLocalFileUnix.h
+++ b/xpcom/io/nsLocalFileUnix.h
@@ -87,6 +87,11 @@
#endif
#if defined(HAVE_STAT64) && defined(HAVE_LSTAT64)
+ #if defined (AIX)
+ #if defined STAT
+ #undef STAT
+ #endif
+ #endif
#define STAT stat64
#define LSTAT lstat64
#define HAVE_STATS64 1