summary refs log tree commit diff
path: root/libio/fileops.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/fileops.c')
-rw-r--r--libio/fileops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libio/fileops.c b/libio/fileops.c
index a3138afd16..b4bd5ce7cd 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -165,7 +165,7 @@ DEFUN(_IO_file_fopen, (fp, filename, mode),
     read_write = _IO_NO_READS|_IO_IS_APPENDING;
     break;
   default:
-    errno = EINVAL;
+    __set_errno (EINVAL);
     return NULL;
   }
   if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+')) {