summaryrefslogtreecommitdiff
path: root/libc/stdio/popen.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/stdio/popen.c')
-rw-r--r--libc/stdio/popen.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libc/stdio/popen.c b/libc/stdio/popen.c
index bc91bb73b..0a91f0e22 100644
--- a/libc/stdio/popen.c
+++ b/libc/stdio/popen.c
@@ -21,7 +21,7 @@ FILE *popen (const char *command, const char *mode)
reading = (mode[0] == 'r');
if ((!reading && (mode[0] != 'w')) || mode[1]) {
- errno = EINVAL; /* Invalid mode arg. */
+ __set_errno(EINVAL); /* Invalid mode arg. */
} else if (pipe(pipe_fd) == 0) {
pr = pipe_fd[reading];
pnr = pipe_fd[1-reading];