Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

recvfrom

Status
Not open for further replies.

escafia

Programmer
Feb 4, 2006
2
PT
hi.
i've a problem in a project i'm trying to start.


main() {
.
.
.
struct sockaddr_in serv_addr, cli_addr;
int sizeCli=sizeof(cli_addr);
.
.
.
recvfrom(sock, buffer,1424, 0, (struct sockaddr *)&cli_addr, &sizeCli);
.
.
.}

when i compile:

servdns.c:48: warning: pointer targets in passing argument 6 of ‘recvfrom’ differ in signedness

i don't see where is the error.
if somenone could help me i apreciate that.
tkx
 
Well how about looking at the signed-ness of parameter 6?

[tt]ssize_t recvfrom(int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen);[/tt]
you provided pointer-to-int
it expects pointer-to-socklen_t.

The answer seems to be to fix the type of your variable.

--
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top