diff --git a/lib/other/_lseek64.c b/lib/other/_lseek64.c new file mode 100644 index 000000000..e4aa9c506 --- /dev/null +++ b/lib/other/_lseek64.c @@ -0,0 +1,22 @@ +#include +#define lseek64 _lseek64 +#include +#include + +PUBLIC int lseek64(fd, offset, whence, newpos) +int fd; +u64_t offset; +int whence; +u64_t *newpos; +{ + message m; + + m.m2_i1 = fd; + m.m2_l1 = ex64lo(offset); + m.m2_l2 = ex64hi(offset); + m.m2_i2 = whence; + if (_syscall(FS, LLSEEK, &m) < 0) return -1; + if (newpos) + *newpos= make64(m.m2_l2, m.m2_l1); + return 0; +} diff --git a/lib/syscall/lseek64.s b/lib/syscall/lseek64.s new file mode 100644 index 000000000..ec8600ec9 --- /dev/null +++ b/lib/syscall/lseek64.s @@ -0,0 +1,7 @@ +.sect .text +.extern __lseek64 +.define _lseek64 +.align 2 + +_lseek64: + jmp __lseek64