Переглянути джерело

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