diff options
author | Tony Gutierrez <anthony.gutierrez@amd.com> | 2016-08-05 17:15:19 -0400 |
---|---|---|
committer | Tony Gutierrez <anthony.gutierrez@amd.com> | 2016-08-05 17:15:19 -0400 |
commit | fa5e64987e185c3cf586e55957ebaa78b8b891fd (patch) | |
tree | 1a47d35399b2e98c8b2c754a3d3f3192d64606c0 /src/sim | |
parent | 0b68475b102a9ecc769d1a3493a34055e08c2e7e (diff) | |
download | gem5-fa5e64987e185c3cf586e55957ebaa78b8b891fd.tar.xz |
sim: fix issues with pwrite(); don't enable fstatfs
this patch fixes issues with changeset 11593
use the host's pwrite() syscall for pwrite64Func(),
as opposed to pwrite64(), because pwrite64() does
not work well on all distros.
undo the enabling of fstatfs, as we will add this
in a separate pate.
Diffstat (limited to 'src/sim')
-rw-r--r-- | src/sim/syscall_emul.hh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/sim/syscall_emul.hh b/src/sim/syscall_emul.hh index 906a01edb..7cce9e9c0 100644 --- a/src/sim/syscall_emul.hh +++ b/src/sim/syscall_emul.hh @@ -64,6 +64,7 @@ #include <sys/stat.h> #include <sys/time.h> #include <sys/uio.h> +#include <unistd.h> #include <cerrno> #include <string> @@ -1406,7 +1407,7 @@ pwrite64Func(SyscallDesc *desc, int num, LiveProcess *p, ThreadContext *tc) BufferArg bufArg(bufPtr, nbytes); bufArg.copyIn(tc->getMemProxy()); - int bytes_written = pwrite64(sim_fd, bufArg.bufferPtr(), nbytes, offset); + int bytes_written = pwrite(sim_fd, bufArg.bufferPtr(), nbytes, offset); return (bytes_written == -1) ? -errno : bytes_written; } |