Skip to content

Commit 755b6c5

Browse files
FIX: Compilation under Windows
1 parent 62228aa commit 755b6c5

File tree

1 file changed

+13
-5
lines changed

1 file changed

+13
-5
lines changed

units/uip.pas

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,11 @@
7272
Implementation
7373

7474
Uses
75-
process, StrUtils;
75+
process, StrUtils
76+
{$IFDEF Windows}
77+
, math
78+
{$ENDIF}
79+
;
7680

7781
Function StrToIPAddress(Value: String): TIPAddress;
7882
Var
@@ -157,7 +161,8 @@
157161
// If netmask is in hex format (0x...), we could convert it, but for now just store as is
158162
// Most common: 0xffffff00 = 255.255.255.0
159163
result[high(result)].SubnetMask := tmp;
160-
End Else Begin
164+
End
165+
Else Begin
161166
result[high(result)].SubnetMask := '255.255.255.0'; // Default fallback
162167
End;
163168

@@ -167,10 +172,12 @@
167172
If pos(':', tmp) <> 0 Then Begin
168173
tmp := copy(tmp, 1, pos(':', tmp) - 1);
169174
result[high(result)].AdapterName := trim(tmp);
170-
End Else Begin
175+
End
176+
Else Begin
171177
result[high(result)].AdapterName := 'unknown';
172178
End;
173-
End Else Begin
179+
End
180+
Else Begin
174181
result[high(result)].AdapterName := 'unknown';
175182
End;
176183
End;
@@ -198,7 +205,8 @@
198205
setlength(result, high(result));
199206
Continue;
200207
End;
201-
End Else Begin
208+
End
209+
Else Begin
202210
setlength(result, high(result));
203211
Continue;
204212
End;

0 commit comments

Comments
 (0)