diff --git a/arch/sim/src/sim/up_hostfs.c b/arch/sim/src/sim/up_hostfs.c index 828f7e9803..151799e58f 100644 --- a/arch/sim/src/sim/up_hostfs.c +++ b/arch/sim/src/sim/up_hostfs.c @@ -348,6 +348,7 @@ int host_fchstat(int fd, const struct nuttx_stat_s *buf, int flags) } else { + times[0].tv_sec = 0; times[0].tv_nsec = UTIME_OMIT; } @@ -358,6 +359,7 @@ int host_fchstat(int fd, const struct nuttx_stat_s *buf, int flags) } else { + times[1].tv_sec = 0; times[1].tv_nsec = UTIME_OMIT; } @@ -634,6 +636,7 @@ int host_chstat(const char *path, const struct nuttx_stat_s *buf, int flags) } else { + times[0].tv_sec = 0; times[0].tv_nsec = UTIME_OMIT; } @@ -644,6 +647,7 @@ int host_chstat(const char *path, const struct nuttx_stat_s *buf, int flags) } else { + times[1].tv_sec = 0; times[1].tv_nsec = UTIME_OMIT; } diff --git a/fs/rpmsgfs/rpmsgfs_server.c b/fs/rpmsgfs/rpmsgfs_server.c index 41b7984a0c..6698be31bf 100644 --- a/fs/rpmsgfs/rpmsgfs_server.c +++ b/fs/rpmsgfs/rpmsgfs_server.c @@ -769,6 +769,7 @@ static int rpmsgfs_chstat_handler(FAR struct rpmsg_endpoint *ept, } else { + times[0].tv_sec = 0; times[0].tv_nsec = UTIME_OMIT; } @@ -778,6 +779,7 @@ static int rpmsgfs_chstat_handler(FAR struct rpmsg_endpoint *ept, } else { + times[1].tv_sec = 0; times[1].tv_nsec = UTIME_OMIT; }