[Bug 51232] New: calling WsaGetLastError() after calling getsockopt() with a file descriptor that is not a socket differs from Windows
https://bugs.winehq.org/show_bug.cgi?id=51232 Bug ID: 51232 Summary: calling WsaGetLastError() after calling getsockopt() with a file descriptor that is not a socket differs from Windows Product: Wine Version: 5.0.3 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: -unknown Assignee: wine-bugs(a)winehq.org Reporter: michaela(a)molthagen.de Distribution: --- Program: ZOC Terminal 8.02.4 (x64) int err, rc, type= 0, fd; socklen_t type_len= sizeof(type); fd= open("C:\somefile.txt", O_RDONLY); if (fd==-1) return; // fd is now a file descriptor for a file, not a socket. rc= getsockopt(fd, SOL_SOCKET, SO_TYPE, (char *)&type, &type_len); err= WSAGetLastError(); notasocket= (rc==-1 &&(err==WSAENOTSOCK); // notasocket is now FALSE, because Windows returns WSAENOTSOCK, but Wine returns WSAEBADF // Linux returns ENOTSOCK, so the Windows WSAENOTSOCK is the best representation of that -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=51232 Sagawa <sagawa.aki+winebugs(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |sagawa.aki+winebugs(a)gmail.c | |om --- Comment #1 from Sagawa <sagawa.aki+winebugs(a)gmail.com> --- It should be fixed by commit ffe20add5812fc45267af22aaa2af7d4e9a39d0e . Could you try with the patch or the next release (guess Wine 6.16)? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=51232 Andrew Nguyen <arethusa26@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |RESOLVED Fixed by SHA1| |587732acb7834a52a2af5bb45e5 | |9899ab8ec3f5d Keywords| |testcase Resolution|--- |FIXED --- Comment #2 from Andrew Nguyen <arethusa26@gmail.com> --- I'm not sure how the reported issue would be observed in ZOC Terminal, but the provided test program observes the correct Winsock last error WSAENOTSOCK when run with wine-11.0. The issue was actually first fixed in wine-5.14 by commit 587732acb7834a52a2af5bb45e59899ab8ec3f5d, which was later backported to the wine-5.0.4 stable release. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=51232 Andrew Nguyen <arethusa26@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|-unknown |winsock -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=51232 Alexandre Julliard <julliard@winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Alexandre Julliard <julliard@winehq.org> --- Closing bugs fixed in 11.1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (2)
-
WineHQ Bugzilla -
WineHQ Bugzilla