about summary refs log tree commit diff
path: root/libio/iofdopen.c
diff options
context:
space:
mode:
Diffstat (limited to 'libio/iofdopen.c')
-rw-r--r--libio/iofdopen.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/libio/iofdopen.c b/libio/iofdopen.c
index 797192eaae..67c629c583 100644
--- a/libio/iofdopen.c
+++ b/libio/iofdopen.c
@@ -61,9 +61,7 @@ _IO_fdopen (fd, mode)
       read_write = _IO_NO_READS|_IO_IS_APPENDING;
       break;
     default:
-#ifdef EINVAL
-      errno = EINVAL;
-#endif
+      MAYBE_SET_EINVAL;
       return NULL;
   }
   if (mode[0] == '+' || (mode[0] == 'b' && mode[1] == '+'))