projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
git-merge-changelog: Enable --split-merged-entry by default.
[pspp]
/
lib
/
dup2.c
diff --git
a/lib/dup2.c
b/lib/dup2.c
index ef581a7efd2c8cdad84323b8737a907ea3fccf60..a4422bf3b8c3aed35e4f5bdf2cf734e0a1ce6056 100644
(file)
--- a/
lib/dup2.c
+++ b/
lib/dup2.c
@@
-52,6
+52,13
@@
rpl_dup2 (int fd, int desired_fd)
}
return fd;
}
+ /* Wine 1.0.1 return 0 when desired_fd is negative but not -1:
+ http://bugs.winehq.org/show_bug.cgi?id=21289 */
+ if (desired_fd < 0)
+ {
+ errno = EBADF;
+ return -1;
+ }
# endif
result = dup2 (fd, desired_fd);
# ifdef __linux__