diff --git a/source3/libsmb/libsmb_stat.c b/source3/libsmb/libsmb_stat.c
index 790934b..7372881 100644
a
|
b
|
void setup_stat(struct stat *st, |
102 | 102 | } |
103 | 103 | |
104 | 104 | st->st_dev = dev; |
105 | | st->st_atim = access_time_ts; |
106 | | st->st_ctim = change_time_ts; |
107 | | st->st_mtim = write_time_ts; |
| 105 | st->st_atimespec = access_time_ts; |
| 106 | st->st_ctimespec = change_time_ts; |
| 107 | st->st_mtimespec = write_time_ts; |
108 | 108 | } |
109 | 109 | |
110 | 110 | void setup_stat_from_stat_ex(const struct stat_ex *stex, |
111 | 111 | const char *fname, |
112 | 112 | struct stat *st) |
113 | 113 | { |
114 | | st->st_atim = stex->st_ex_atime; |
115 | | st->st_ctim = stex->st_ex_ctime; |
116 | | st->st_mtim = stex->st_ex_mtime; |
| 114 | st->st_atimespec = stex->st_ex_atime; |
| 115 | st->st_ctimespec = stex->st_ex_ctime; |
| 116 | st->st_mtimespec = stex->st_ex_mtime; |
117 | 117 | |
118 | 118 | st->st_mode = stex->st_ex_mode; |
119 | 119 | st->st_size = stex->st_ex_size; |
diff --git a/source4/torture/libsmbclient/libsmbclient.c b/source4/torture/libsmbclient/libsmbclient.c
index 3f39925..0ed93da 100644
a
|
b
|
static bool torture_libsmbclient_utimes(struct torture_context *tctx) |
1231 | 1231 | ret = smbc_fstat(fhandle, &st); |
1232 | 1232 | torture_assert_int_not_equal(tctx, ret, -1, "smbc_fstat failed"); |
1233 | 1233 | |
1234 | | tbuf[0] = convert_timespec_to_timeval(st.st_atim); |
1235 | | tbuf[1] = convert_timespec_to_timeval(st.st_mtim); |
| 1234 | tbuf[0] = convert_timespec_to_timeval(st.st_atimespec); |
| 1235 | tbuf[1] = convert_timespec_to_timeval(st.st_mtimespec); |
1236 | 1236 | |
1237 | 1237 | tbuf[1] = timeval_add(&tbuf[1], 0, 100000); /* 100 msec */ |
1238 | 1238 | |
… |
… |
static bool torture_libsmbclient_utimes(struct torture_context *tctx) |
1244 | 1244 | |
1245 | 1245 | torture_assert_int_equal( |
1246 | 1246 | tctx, |
1247 | | st.st_mtim.tv_nsec / 1000, |
| 1247 | st.st_mtimespec.tv_nsec / 1000, |
1248 | 1248 | tbuf[1].tv_usec, |
1249 | 1249 | "smbc_utimes did not update msec"); |
1250 | 1250 | |