vha Posted November 23, 2007 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
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now