vha Posted November 23, 2007 Share Posted November 23, 2007 (edited) hi, I have this code for windows: struct sockaddr_in sin; struct hostent* host; host = gethostbyname("appmsg.gadu-gadu.pl"); sin.sin_family = AF_INET; sin.sin_addr.s_addr = *((unsigned long*) host->h_addr); sin.sin_port = htons(80); and i want to use it on my DS, but when i compile someting like this: #include <PA9.h> #include "main.h" . . . struct sockaddr_in client; struct hostent* host; host = gethostbyname("appmsg.gadu-gadu.pl"); client.sin_family = AF_INET; client.sin_addr.s_addr= *((unsigned long*) host->h_addr); client.sin_port = htons(80); I get: " error: 'struct hostent' has no member named 'h_addr' How to fix this?(sorry for my poor English) Edited November 23, 2007 by vha Link to comment Share on other sites More sharing options...
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!Register a new account
Already have an account? Sign in here.Sign In Now