Browse Source

Minor cross compiler changes

Minor changes to allow cross-compiler (Delphi + FreePascal)
PascalCoin 6 years ago
parent
commit
8ac248a555
2 changed files with 10 additions and 8 deletions
  1. 2 0
      src/core/UChunk.pas
  2. 8 8
      src/core/UNetProtocol.pas

+ 2 - 0
src/core/UChunk.pas

@@ -33,6 +33,8 @@ uses
     {$ELSE}
       paszlib_zStream,
     {$ENDIF}
+  {$ELSE}
+  zlib,
   {$ENDIF}
   UAccounts, ULog, UConst, UCrypto;
 

+ 8 - 8
src/core/UNetProtocol.pas

@@ -1065,14 +1065,14 @@ begin
     end;
   finally
     FNetConnections.UnlockList;
-    if Assigned(nc) then begin
-      repeat
-        if (nc.Connected) and Assigned(nc.FNetLock) then begin
-          If nc.FNetLock.TryEnter then Result := True
-          else Sleep(1);
-        end else Exit;
-      until (Result) Or (TPlatform.GetElapsedMilliseconds(tc)>MaxWaitMiliseconds);
-    end;
+  end;
+  if Assigned(nc) then begin
+    repeat
+      if (nc.Connected) and Assigned(nc.FNetLock) then begin
+        If nc.FNetLock.TryEnter then Result := True
+        else Sleep(1);
+      end else Exit;
+    until (Result) Or (TPlatform.GetElapsedMilliseconds(tc)>MaxWaitMiliseconds);
   end;
 end;