1
0

ssfpc.inc fixes by ACBr

git-svn-id: https://svn.code.sf.net/p/synalist/code/trunk@242 7c85be65-684b-0410-a082-b2ed4fbef004
This commit is contained in:
geby 2022-01-08 17:12:50 +00:00
parent 8414d7b862
commit 009ef79a18

@ -364,7 +364,7 @@ type
case sin_family: sa_family_t of case sin_family: sa_family_t of
AF_INET: (sin_port: word; AF_INET: (sin_port: word;
sin_addr: TInAddr; sin_addr: TInAddr;
sin_zero: array[0..7] of Char); sin_zero: array[0..7] of byte);
AF_INET6: (sin6_port: word; AF_INET6: (sin6_port: word;
sin6_flowinfo: longword; sin6_flowinfo: longword;
sin6_addr: TInAddr6; sin6_addr: TInAddr6;
@ -513,9 +513,9 @@ function SizeOfVarSin(sin: TVarSin): integer;
begin begin
case sin.sin_family of case sin.sin_family of
AF_INET: AF_INET:
Result := SizeOf(TSockAddrIn); Result := SizeOf(TSockAddrIn);
AF_INET6: AF_INET6:
Result := SizeOf(TSockAddrIn6); Result := SizeOf(TSockAddrIn6);
else else
Result := 0; Result := 0;
end; end;
@ -861,10 +861,12 @@ begin
if Result = 0 then if Result = 0 then
begin begin
ProtoEnt.Name := ''; ProtoEnt.Name := '';
GetProtocolByNumber(SockProtocol, ProtoEnt); if GetProtocolByNumber(SockProtocol, ProtoEnt) then
ServEnt.port := 0; begin
GetServiceByName(Port, ProtoEnt.Name, ServEnt); ServEnt.port := 0;
Result := synsock.ntohs(ServEnt.port); if GetServiceByName(Port, ProtoEnt.Name, ServEnt) then
Result := synsock.ntohs(ServEnt.port);
end;
end; end;
end; end;