i have some problem with the file sgIP_sockets.c of the lib source. I'm trying to compile ( devkitpro ) but some errors with pointers appear...
it is said :
"In file included from c:/Projects/HelloWorld/source/main.c:8:
C:\...\source\sgIP_sockets.c:81: warning: 'struct sockaddr_in' declared inside parameter list
C:\...\source\sgIP_sockets.c:81: warning: its scope is only this definition or declaration, which is probably not what you want
C:\...\source\sgIP_sockets.c: In function 'bind':
C:\...\source\sgIP_sockets.c:89: error: dereferencing pointer to incomplete type
C:\...\source\sgIP_sockets.c:90: error: dereferencing pointer to incomplete type"
I have the same type of problem in function 'sendto' and recvfrom.
I have tried some possibility but none seem to work...
The code :
CODE
int bind(int socket, struct sockaddr_in *addr, int addr_len)
{
...
retval=sgIP_UDP_Bind((sgIP_Record_UDP *)socketlist[socket].conn_ptr,
((struct sockaddr_in *)addr)->sin_port, //PROB HERE
((struct sockaddr_in *)addr)->sin_addr.s_addr); // PROB HERE
}
The function sgi^p_UDP_Bind is :
CODE
int sgIP_UDP_Bind(sgIP_Record_UDP * rec, int srcport, unsigned long srcip)
I have tried a cast, &, *... i don't find.