You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2020/05/01 09:12:00 UTC

[GitHub] [incubator-nuttx] yamt commented on a change in pull request #932: sim: Update hostfs after the recent struct stat timespec changes

yamt commented on a change in pull request #932:
URL: https://github.com/apache/incubator-nuttx/pull/932#discussion_r418472527



##########
File path: arch/sim/src/sim/up_hostfs.c
##########
@@ -97,18 +97,30 @@ static void host_stat_convert(struct stat *hostbuf, struct nuttx_stat_s *buf)
       buf->st_mode |= NUTTX_S_IFSOCK;
     }
 
-  buf->st_dev     = hostbuf->st_dev;
-  buf->st_ino     = hostbuf->st_ino;
-  buf->st_nlink   = hostbuf->st_nlink;
-  buf->st_uid     = hostbuf->st_uid;
-  buf->st_gid     = hostbuf->st_gid;
-  buf->st_rdev    = hostbuf->st_rdev;
-  buf->st_size    = hostbuf->st_size;
-  buf->st_atim    = hostbuf->st_atime;
-  buf->st_mtim    = hostbuf->st_mtime;
-  buf->st_ctim    = hostbuf->st_ctime;
-  buf->st_blksize = hostbuf->st_blksize;
-  buf->st_blocks  = hostbuf->st_blocks;
+  buf->st_dev          = hostbuf->st_dev;
+  buf->st_ino          = hostbuf->st_ino;
+  buf->st_nlink        = hostbuf->st_nlink;
+  buf->st_uid          = hostbuf->st_uid;
+  buf->st_gid          = hostbuf->st_gid;
+  buf->st_rdev         = hostbuf->st_rdev;
+  buf->st_size         = hostbuf->st_size;
+#if defined(__APPLE__)

Review comment:
       i don't think it works as it would apply to the lvalues (buf->st_atim etc) as well.
   we can rename nuttx fields so that they won't be affected by the macros. but i feel it's uglier.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org