Skip to content

Commit a0eee94

Browse files
authored
Merge pull request #2223 from compnerd/inet_pton
Foundation: expand out `inet_pton`
2 parents 91ec8ed + 4040ae4 commit a0eee94

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Foundation/Process.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ open class Process: NSObject {
305305

306306
var address: sockaddr_in =
307307
sockaddr_in(sin_family: ADDRESS_FAMILY(AF_INET), sin_port: USHORT(0),
308-
sin_addr: IN_ADDR(S_un: in_addr.__Unnamed_union_S_un(S_addr: ULONG("127.0.0.1")!)),
308+
sin_addr: IN_ADDR(S_un: in_addr.__Unnamed_union_S_un(S_un_b: in_addr.__Unnamed_union_S_un.__Unnamed_struct_S_un_b(s_b1: 127, s_b2: 0, s_b3: 0, s_b4: 1))),
309309
sin_zero: (CHAR(0), CHAR(0), CHAR(0), CHAR(0), CHAR(0), CHAR(0), CHAR(0), CHAR(0)))
310310
withUnsafePointer(to: &address) {
311311
$0.withMemoryRebound(to: sockaddr.self, capacity: 1) {

0 commit comments

Comments
 (0)