summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnand Avati <avati@gluster.com>2010-04-08 13:54:50 +0000
committerAnand V. Avati <avati@dev.gluster.com>2010-04-08 12:57:21 -0700
commitaaeddc508488914a7629f63b5284270f784fc614 (patch)
tree7538bfca43ad1011a2af1fe729d2e718b9fa83e9
parent059c8b23e1f19f9cfcd6aa2c2235afc032bc5d34 (diff)
protocol: fix endianness for nanosecond field in stat structurev3.0.4
Signed-off-by: Anand V. Avati <avati@blackhole.gluster.com> Signed-off-by: Anand V. Avati <avati@dev.gluster.com> BUG: 801 (Direct io-mode support and related changes in caching translators.) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=801
-rw-r--r--libglusterfs/src/protocol.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libglusterfs/src/protocol.h b/libglusterfs/src/protocol.h
index 6a10812f3..3a6043704 100644
--- a/libglusterfs/src/protocol.h
+++ b/libglusterfs/src/protocol.h
@@ -75,11 +75,11 @@ gf_stat_to_stat (struct gf_stat *gf_stat, struct stat *stat)
stat->st_blksize = ntoh32 (gf_stat->blksize);
stat->st_blocks = ntoh64 (gf_stat->blocks);
stat->st_atime = ntoh32 (gf_stat->atime);
- ST_ATIM_NSEC_SET(stat, gf_stat->atime_nsec);
+ ST_ATIM_NSEC_SET(stat, ntoh32 (gf_stat->atime_nsec));
stat->st_mtime = ntoh32 (gf_stat->mtime);
- ST_MTIM_NSEC_SET(stat, gf_stat->mtime_nsec);
+ ST_MTIM_NSEC_SET(stat, ntoh32 (gf_stat->mtime_nsec));
stat->st_ctime = ntoh32 (gf_stat->ctime);
- ST_CTIM_NSEC_SET(stat, gf_stat->ctime_nsec);
+ ST_CTIM_NSEC_SET(stat, ntoh32 (gf_stat->ctime_nsec));
}