From 635d630baa232150e0ee8659bc777d50e2bbf3d0 Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 20 Jun 2013 18:26:04 +0200 Subject: [PATCH 1/2] waf: fix build on AIX7 the same works for AIX 5,6,7 so leave away the version specifics (as autoconf build did) Signed-off-by: Christian Ambach --- buildtools/wafsamba/wscript | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/wafsamba/wscript b/buildtools/wafsamba/wscript index 17aef27..d115b5f 100755 --- a/buildtools/wafsamba/wscript +++ b/buildtools/wafsamba/wscript @@ -322,7 +322,7 @@ def configure(conf): else: conf.env.HAVE_LD_VERSION_SCRIPT = False - if sys.platform == "aix5" or sys.platform == "aix6": + if sys.platform.startswith('aix'): conf.DEFINE('_ALL_SOURCE', 1, add_to_cflags=True) # Might not be needed if ALL_SOURCE is defined # conf.DEFINE('_XOPEN_SOURCE', 600, add_to_cflags=True) -- 1.7.11.7 From c187a6429c467c70684be5d4b20d2a3f5a91225b Mon Sep 17 00:00:00 2001 From: Christian Ambach Date: Thu, 20 Jun 2013 18:27:13 +0200 Subject: [PATCH 2/2] s3:lib/system fix build on AIX 7 AIX uses struct stat64 with struct timespec64, do direct assignment does not work any more. Pair-Programmed-With: Volker Lendecke Signed-off-by: Christian Ambach --- source3/lib/system.c | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/source3/lib/system.c b/source3/lib/system.c index 8dbf7dc..8252e4f 100644 --- a/source3/lib/system.c +++ b/source3/lib/system.c @@ -228,7 +228,10 @@ static struct timespec get_atimespec(const struct stat *pst) return ret; #else #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - return pst->st_atim; + struct timespec ret; + ret.tv_sec = pst->st_atim.tv_sec; + ret.tv_nsec = pst->st_atim.tv_nsec; + return ret; #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) struct timespec ret; ret.tv_sec = pst->st_atime; @@ -263,7 +266,10 @@ static struct timespec get_mtimespec(const struct stat *pst) return ret; #else #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - return pst->st_mtim; + struct timespec ret; + ret.tv_sec = pst->st_mtim.tv_sec; + ret.tv_nsec = pst->st_mtim.tv_nsec; + return ret; #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) struct timespec ret; ret.tv_sec = pst->st_mtime; @@ -298,7 +304,10 @@ static struct timespec get_ctimespec(const struct stat *pst) return ret; #else #if defined(HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC) - return pst->st_ctim; + struct timespec ret; + ret.tv_sec = pst->st_ctim.tv_sec; + ret.tv_nsec = pst->st_ctim.tv_nsec; + return ret; #elif defined(HAVE_STRUCT_STAT_ST_MTIMENSEC) struct timespec ret; ret.tv_sec = pst->st_ctime; -- 1.7.11.7