}
return fd;
}
- /* Some mingw versions also return the wrong value if desired_fd is
- negative but not -1. */
+ /* 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;