File tree 1 file changed +2
-2
lines changed 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -1313,7 +1313,7 @@ when defined(nimdoc) or (defined(posix) and not useNimNetLite):
1313
1313
when not defined (nimdoc):
1314
1314
var socketAddr = makeUnixAddr (path)
1315
1315
if socket.fd.connect (cast [ptr SockAddr ](addr socketAddr),
1316
- (sizeof (socketAddr.sun_family ) + path.len).SockLen ) != 0 'i32 :
1316
+ (offsetOf (socketAddr, sun_path ) + path.len + 1 ).SockLen ) != 0 'i32 :
1317
1317
raiseOSError (osLastError ())
1318
1318
1319
1319
proc bindUnix * (socket: Socket , path: string ) =
@@ -1322,7 +1322,7 @@ when defined(nimdoc) or (defined(posix) and not useNimNetLite):
1322
1322
when not defined (nimdoc):
1323
1323
var socketAddr = makeUnixAddr (path)
1324
1324
if socket.fd.bindAddr (cast [ptr SockAddr ](addr socketAddr),
1325
- (sizeof (socketAddr.sun_family ) + path.len).SockLen ) != 0 'i32 :
1325
+ (offsetOf (socketAddr, sun_path ) + path.len + 1 ).SockLen ) != 0 'i32 :
1326
1326
raiseOSError (osLastError ())
1327
1327
1328
1328
when defineSsl:
You can’t perform that action at this time.
0 commit comments