initial import
[patches.git] / pread_write_sh.patch
1 diff -upr libc/sysdeps/linux/sh/pread_write.c libc-st/sysdeps/linux/sh/pread_write.c
2 --- libc/sysdeps/linux/sh/pread_write.c 2007-04-26 10:03:10.154246000 +0200
3 +++ libc-st/sysdeps/linux/sh/pread_write.c 2007-04-26 10:04:12.474506000 +0200
4 @@ -33,7 +33,7 @@ static inline _syscall6(ssize_t, __sysca
5
6 ssize_t __libc_pread(int fd, void *buf, size_t count, off_t offset)
7 {
8 - return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR((off_t)0,offset)));
9 + return(__syscall_pread(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset)));
10 }
11 weak_alias(__libc_pread,pread)
12
13 @@ -66,7 +66,7 @@ static inline _syscall6(ssize_t, __sysca
14
15 ssize_t __libc_pwrite(int fd, const void *buf, size_t count, off_t offset)
16 {
17 - return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR((off_t)0,offset)));
18 + return(__syscall_pwrite(fd,buf,count,0,__LONG_LONG_PAIR(offset >> 31,offset)));
19 }
20 weak_alias(__libc_pwrite,pwrite)
21