mirror of https://github.com/red-prig/fpPS4.git
sceNetErrnoLoc
This commit is contained in:
parent
0d3d3394f0
commit
bcf34a5b02
|
@ -12,6 +12,9 @@ uses
|
|||
|
||||
implementation
|
||||
|
||||
uses
|
||||
sys_pthread;
|
||||
|
||||
type
|
||||
SceNetInAddr_t=DWORD;
|
||||
|
||||
|
@ -30,6 +33,35 @@ type
|
|||
data:array[0..SCE_NET_ETHER_ADDR_LEN-1] of Byte;
|
||||
end;
|
||||
|
||||
function _set_net_errno(r:Integer):Integer;
|
||||
var
|
||||
t:pthread;
|
||||
begin
|
||||
Result:=0;
|
||||
|
||||
t:=tcb_thread;
|
||||
if (t<>nil) then t^.net_errno:=r;
|
||||
|
||||
if (r<>0) then
|
||||
begin
|
||||
Result:=-1;
|
||||
end;
|
||||
end;
|
||||
|
||||
function _net_error:Pointer;
|
||||
var
|
||||
t:pthread;
|
||||
begin
|
||||
Result:=nil;
|
||||
t:=tcb_thread;
|
||||
if (t<>nil) then Result:=@t^.net_errno;
|
||||
end;
|
||||
|
||||
function ps4_sceNetErrnoLoc:Pointer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=_net_error;
|
||||
end;
|
||||
|
||||
function ps4_sceNetInit:Integer; SysV_ABI_CDecl;
|
||||
begin
|
||||
Result:=0;
|
||||
|
@ -378,6 +410,7 @@ begin
|
|||
Result:=TElf_node.Create;
|
||||
Result.pFileName:=name;
|
||||
lib:=Result._add_lib('libSceNet');
|
||||
lib^.set_proc($1D03B09DF3068A94,@ps4_sceNetErrnoLoc);
|
||||
lib^.set_proc($3657AFECB83C9370,@ps4_sceNetInit);
|
||||
lib^.set_proc($7131A473AFD30652,@ps4_sceNetTerm);
|
||||
lib^.set_proc($76024169E2671A9A,@ps4_sceNetPoolCreate);
|
||||
|
|
|
@ -150,6 +150,7 @@ type
|
|||
name:array[0..31] of AnsiChar;
|
||||
//
|
||||
errno:QWORD;
|
||||
net_errno:QWORD;
|
||||
//
|
||||
cleanup:p_pthread_cleanup;
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue