diff options
author | Björn-Egil Dahlberg <[email protected]> | 2011-11-30 17:59:40 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2011-12-02 15:41:14 +0100 |
commit | 9c15c1015bd60dd837587e9cf4be67abe0995129 (patch) | |
tree | 7f78fee505b1ba69e5c6391e10507d0bd6cf6e3b /erts/emulator | |
parent | 7be5712096a0fdf44e2b31d493f03688d4c137e9 (diff) | |
download | otp-9c15c1015bd60dd837587e9cf4be67abe0995129.tar.gz otp-9c15c1015bd60dd837587e9cf4be67abe0995129.tar.bz2 otp-9c15c1015bd60dd837587e9cf4be67abe0995129.zip |
efile_drv: Fix casting between Sint64 and time_t
Diffstat (limited to 'erts/emulator')
-rw-r--r-- | erts/emulator/drivers/common/efile_drv.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/erts/emulator/drivers/common/efile_drv.c b/erts/emulator/drivers/common/efile_drv.c index 184d27fb62..e7235c30f7 100644 --- a/erts/emulator/drivers/common/efile_drv.c +++ b/erts/emulator/drivers/common/efile_drv.c @@ -2124,9 +2124,10 @@ file_async_ready(ErlDrvData e, ErlDrvThreadData data) put_int32(d->info.size_low, &resbuf[1 + ( 1 * 4)]); put_int32(d->info.type, &resbuf[1 + ( 2 * 4)]); + /* Note 64 bit indexing in resbuf here */ put_int64(d->info.accessTime, &resbuf[1 + ( 3 * 4)]); put_int64(d->info.modifyTime, &resbuf[1 + ( 5 * 4)]); - put_int64(d->info.cTime , &resbuf[1 + ( 7 * 4)]); + put_int64(d->info.cTime, &resbuf[1 + ( 7 * 4)]); put_int32(d->info.mode, &resbuf[1 + ( 9 * 4)]); put_int32(d->info.links, &resbuf[1 + (10 * 4)]); @@ -2490,9 +2491,9 @@ file_output(ErlDrvData e, char* buf, int count) d->info.mode = get_int32(buf + 0 * 4); d->info.uid = get_int32(buf + 1 * 4); d->info.gid = get_int32(buf + 2 * 4); - d->info.accessTime = get_int64(buf + 3 * 4); - d->info.modifyTime = get_int64(buf + 5 * 4); - d->info.cTime = get_int64(buf + 7 * 4); + d->info.accessTime = (time_t)((Sint64)get_int64(buf + 3 * 4)); + d->info.modifyTime = (time_t)((Sint64)get_int64(buf + 5 * 4)); + d->info.cTime = (time_t)((Sint64)get_int64(buf + 7 * 4)); FILENAME_COPY(d->b, buf + 9*4); d->command = command; |