diff options
author | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-01-27 21:20:18 +0000 |
---|---|---|
committer | Spencer Oliver <ntfreak@users.sourceforge.net> | 2010-01-28 20:21:31 +0000 |
commit | 465a06dfdc6c5d4af377dac7b9d71845cb0dc034 (patch) | |
tree | 2e3e5e3a4089ca621e486795b37154a1309fce1b /src/helper | |
parent | 3172be80a3e14f4c8c3628a37db348c04fd60fc4 (diff) | |
download | openocd_libswd-465a06dfdc6c5d4af377dac7b9d71845cb0dc034.tar.gz openocd_libswd-465a06dfdc6c5d4af377dac7b9d71845cb0dc034.tar.bz2 openocd_libswd-465a06dfdc6c5d4af377dac7b9d71845cb0dc034.tar.xz openocd_libswd-465a06dfdc6c5d4af377dac7b9d71845cb0dc034.zip |
ARM semihosting: fix writing to stdout
SYS_FLEN would be called before a write on a descriptor to check its size.
Currently lseek would fail with -1 when given the stdout/stderr descriptor.
Changing to use fstat seems to be the standard way of handling this.
Signed-off-by: Spencer Oliver <ntfreak@users.sourceforge.net>
Diffstat (limited to 'src/helper')
-rw-r--r-- | src/helper/system.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/helper/system.h b/src/helper/system.h index 169df1cb..af19d018 100644 --- a/src/helper/system.h +++ b/src/helper/system.h @@ -50,6 +50,8 @@ #ifdef _WIN32 #include <winsock2.h> #include <ws2tcpip.h> +#include <sys/types.h> +#include <sys/stat.h> #endif // --- platform specific headers --- |