probleme avec la resolution d'un nom avec les sockets
salut les amis
pourquoi ce code marche pas sur ma debian alors qu'il marche bien sur windows xp avec Dev-C++
Code:
1 2 3 4 5 6 7 8 9 10 11 12
|
.....
struct sockaddr_in addr1 ;
int ID1 = socket(AF_INET,SOCK_STREAM,0) ;
addr1.sin_family = AF_INET ;
addr1.sin_port = htons(1500) ;
struct hostent *host = gethostbyname ("xxx.no-ip.biz") ;//48
struct in_addr *addresse = (struct in_addr *)host->h_addr_list[0] ;//49
addr1.sin_addr = *addresse ; |
Code:
1 2 3 4
| debian:/home/yous/Desktop/Projet# gcc Client.c
Client.c: In function main:
Client.c:48: warning: initialization makes pointer from integer without a cast
Client.c:49: error: dereferencing pointer to incomplete type |