diff options
author | Christian Ambach <ambi@samba.org> | 2013-06-20 18:27:13 +0200 |
---|---|---|
committer | Volker Lendecke <vl@samba.org> | 2013-08-02 09:47:43 +0200 |
commit | ba40d0d9d320e500621a6a8107a2ef0a34aeb6ba (patch) | |
tree | 1525e19903803330e7273785fbc7b1fdaaf52352 /source3 | |
parent | f556e71db74e695349c03bf82f68ea6e700eae03 (diff) | |
download | samba-ba40d0d9d320e500621a6a8107a2ef0a34aeb6ba.tar.gz samba-ba40d0d9d320e500621a6a8107a2ef0a34aeb6ba.tar.bz2 samba-ba40d0d9d320e500621a6a8107a2ef0a34aeb6ba.zip |
s3:lib/system fix build on AIX 7
AIX uses struct stat64 with struct timespec64, so direct assignment does
not work any more.
Pair-Programmed-With: Volker Lendecke <vl@samba.org>
Signed-off-by: Christian Ambach <ambi@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Fri Aug 2 09:47:43 CEST 2013 on sn-devel-104
Diffstat (limited to 'source3')
-rw-r--r-- | source3/lib/system.c | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/source3/lib/system.c b/source3/lib/system.c index 8dbf7dc33b..8252e4fcfc 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; |