summaryrefslogtreecommitdiff
path: root/libc/src/lseek.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/lseek.c')
-rw-r--r--libc/src/lseek.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/src/lseek.c b/libc/src/lseek.c
index bffc81f..1d36c90 100644
--- a/libc/src/lseek.c
+++ b/libc/src/lseek.c
@@ -6,19 +6,19 @@ off_t lseek(int fd, off_t seek, int wheel) {
off_t r;
if ((wheel != SEEK_SET) && (wheel != SEEK_CUR) && (wheel != SEEK_END)) {
- _impure_ptr->_errno = EINVAL;
+ set_errno(EINVAL);
return -1;
}
if (!fio_is_open(fd)) {
- _impure_ptr->_errno = EBADF;
+ set_errno(EBADF);
return -1;
}
r = fio_seek(fd, seek, wheel);
if (r < 0)
- _impure_ptr->_errno = EINVAL;
+ set_errno(EINVAL);
return r;
}