Procházet zdrojové kódy

Linux compilation error fix.

Damian Kołakowski před 9 roky
rodič
revize
467cf49cd6
2 změnil soubory, kde provedl 2 přidání a 2 odebrání
  1. 1 1
      Sources/Linux.swift
  2. 1 1
      Sources/Server.swift

+ 1 - 1
Sources/Linux.swift

@@ -15,7 +15,7 @@ public class LinuxAsyncServer: TcpServer {
     private var descriptors = [pollfd]()
     private let server: Int32
     
-    public required init(_ port: in_port_t) throws {
+    public required init(_ port: in_port_t, forceIPv4: Bool, bindAddress: String? = nil) throws {
         
         self.server = try LinuxAsyncServer.nonBlockingSocketForListenening(port)
         

+ 1 - 1
Sources/Server.swift

@@ -15,7 +15,7 @@ public class Server {
     
     public init(_ port: in_port_t = 8080, forceIPv4: Bool = false) throws {
         #if os(Linux)
-            self.server = try LinuxAsyncServer(port)
+            self.server = try LinuxAsyncServer(port, forceIPv4: forceIPv4)
         #else
             self.server = try MacOSAsyncTCPServer(port, forceIPv4: forceIPv4)
         #endif