This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Named AF_UNIX socket not working in cygwin1.dll of git HEAD.


Hi Corinna,

On Wed, 4 Jul 2018 02:01:08 +0900
Takashi Yano wrote:
> I have check and found this happens only in 32 bit version. I mean
> 32 bit cygwin on 64 bit windows 10. 64 bit version work as expected.

I have looked into this problem, and found calling af_local_set_secret()
in fhandler_socket_local::bind() causes exception 0xc0000005.

Calling RtlGenRandom() in af_local_set_secret() may not be as expected.

While building cygwin1.dll in 32 bit environment, following warning is
shown. This is probably the cause.

Warning: resolving _SystemFunction036 by linking to _SystemFunction036@8

I am not sure why, but the following patch seems to be able solve this
problem.

diff --git a/winsup/cygwin/fhandler_socket_local.cc b/winsup/cygwin/fhandler_socket_local.cc
index 2e01f30a2..68786f3a4 100644
--- a/winsup/cygwin/fhandler_socket_local.cc
+++ b/winsup/cygwin/fhandler_socket_local.cc
@@ -21,7 +21,7 @@
 #undef u_long
 #define u_long __ms_u_long
 #endif
-#include <w32api/ntsecapi.h>
+#include <ntsecapi.h>
 #include <w32api/ws2tcpip.h>
 #include <w32api/mswsock.h>
 #include <unistd.h>

Thank you.

-- 
Takashi Yano <takashi.yano@nifty.ne.jp>

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]