summaryrefslogtreecommitdiffstats
path: root/lib/libc/stdio/stdio.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libc/stdio/stdio.c')
-rw-r--r--lib/libc/stdio/stdio.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libc/stdio/stdio.c b/lib/libc/stdio/stdio.c
index 46dd2df..ea8a4c1 100644
--- a/lib/libc/stdio/stdio.c
+++ b/lib/libc/stdio/stdio.c
@@ -118,8 +118,10 @@ __sseek(cookie, offset, whence)
* (fseek) in the cases it can't detect.
*/
if (ret < 0) {
- if (errret == 0)
+ if (errret == 0) {
+ fp->_flags |= __SERR;
errno = EINVAL;
+ }
fp->_flags &= ~__SOFF;
ret = -1;
} else {
OpenPOWER on IntegriCloud