Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/nios2')
-rw-r--r--libgloss/nios2/io-lseek.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libgloss/nios2/io-lseek.c b/libgloss/nios2/io-lseek.c
index bfc23c1bc..d47fe0798 100644
--- a/libgloss/nios2/io-lseek.c
+++ b/libgloss/nios2/io-lseek.c
@@ -39,7 +39,7 @@ off_t lseek (int fd, off_t offset, int whence)
#if HOSTED
gdb_parambuf_t parameters;
parameters[0] = (uint32_t) fd;
- parameters[1] = (uint32_t) ((offset >> 32) & 0xffffffff);
+ parameters[1] = (uint32_t) ((int64_t)offset >> 32);
parameters[2] = (uint32_t) (offset & 0xffffffff);
parameters[3] = __hosted_to_gdb_lseek_flags (whence);
__io_hosted (HOSTED_LSEEK, parameters);