瀏覽代碼

* Fix windows compilation

Michaël Van Canneyt 1 月之前
父節點
當前提交
cd72a1a677
共有 1 個文件被更改,包括 6 次插入6 次删除
  1. 6 6
      packages/fcl-net/src/ssockets.pp

+ 6 - 6
packages/fcl-net/src/ssockets.pp

@@ -21,9 +21,15 @@ interface
 
 {$IFDEF FPC_DOTTEDUNITS}
 uses
+{$ifdef Windows}
+  WinApi.Winsock2, WinApi.Windows,
+{$endif}
   System.SysUtils, System.Classes, System.CTypes, System.Net.Sockets, System.Net.FPSockets, System.Tuples;
 {$ELSE FPC_DOTTEDUNITS}
 uses
+{$ifdef windows}
+  winsock2, windows,
+{$endif}
   SysUtils, Classes, ctypes, sockets, fpsockets, tuples;
 {$ENDIF FPC_DOTTEDUNITS}
 
@@ -373,9 +379,6 @@ uses
 // This must be here, to prevent it from overriding the sockets definitions... :/
 {$ifdef unix}
   UnixApi.Base,UnixApi.Unix,
-{$endif}
-{$ifdef Windows}
-  WinApi.Winsock2, WinApi.Windows,
 {$endif}
   System.Net.Resolve;
 {$ELSE FPC_DOTTEDUNITS}
@@ -383,9 +386,6 @@ uses
 // This must be here, to prevent it from overriding the sockets definitions... :/
 {$ifdef unix}
   BaseUnix,Unix,
-{$endif}
-{$ifdef windows}
-  winsock2, windows,
 {$endif}
   resolve;
 {$ENDIF FPC_DOTTEDUNITS}