PATCH: fix compile error with xlc on AIX
Jeremy Allison
jra at samba.org
Thu Jul 30 17:44:04 UTC 2020
On Fri, Jul 10, 2020 at 01:58:38PM +0200, Björn JACKE via samba-technical wrote:
> Hi,
>
> please review and push eventually...
>
> Thanks
> Björn
Hi Björn,
Where are we with this ? Did it get merged or submitted as
a gitlab MR ?
I can't find it...
Jeremy.
> From cf0994c69bc89cc73009541bf087d264478501f4 Mon Sep 17 00:00:00 2001
> From: Bjoern Jacke <bj at sernet.de>
> Date: Fri, 10 Jul 2020 11:48:51 +0000
> Subject: [PATCH] libsmb: fix build with xlc on AIX
>
> xlc complains:
>
> 1506-067 (S) A struct or union can only be assigned to a compatible type.
>
> BUG: https://bugzilla.samba.org/show_bug.cgi?id=14438
>
> Signed-off-by: Bjoern Jacke <bjacke at samba.org>
>
> ---
> source3/libsmb/libsmb_stat.c | 18 ++++++++++++------
> 1 file changed, 12 insertions(+), 6 deletions(-)
>
> diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
> index 790934bd565..8abc6043030 100644
> --- a/source3/libsmb/libsmb_stat.c
> +++ b/source3/libsmb/libsmb_stat.c
> @@ -102,18 +102,24 @@ void setup_stat(struct stat *st,
> }
>
> st->st_dev = dev;
> - st->st_atim = access_time_ts;
> - st->st_ctim = change_time_ts;
> - st->st_mtim = write_time_ts;
> + st->st_atim.tv_sec = access_time_ts.tv_sec;
> + st->st_atim.tv_nsec = access_time_ts.tv_nsec;
> + st->st_ctim.tv_sec = change_time_ts.tv_sec;
> + st->st_ctim.tv_nsec = change_time_ts.tv_nsec;
> + st->st_mtim.tv_sec = write_time_ts.tv_sec;
> + st->st_mtim.tv_nsec = write_time_ts.tv_nsec;
> }
>
> void setup_stat_from_stat_ex(const struct stat_ex *stex,
> const char *fname,
> struct stat *st)
> {
> - st->st_atim = stex->st_ex_atime;
> - st->st_ctim = stex->st_ex_ctime;
> - st->st_mtim = stex->st_ex_mtime;
> + st->st_atim.tv_sec = stex->st_ex_atime.tv_sec;
> + st->st_atim.tv_nsec = stex->st_ex_atime.tv_nsec;
> + st->st_ctim.tv_sec = stex->st_ex_ctime.tv_sec;
> + st->st_ctim.tv_nsec = stex->st_ex_ctime.tv_nsec;
> + st->st_mtim.tv_sec = stex->st_ex_mtime.tv_sec;
> + st->st_mtim.tv_nsec = stex->st_ex_mtime.tv_nsec;
>
> st->st_mode = stex->st_ex_mode;
> st->st_size = stex->st_ex_size;
> --
> 2.20.2
>
More information about the samba-technical
mailing list