본문 바로가기
콤퓨타/Linux

64bit에서 inet_ntoa

by 어니엉 2013. 2. 20.
728x90

32비트에서는 그냥 쓰면 됬지만, 이걸 64비트에서 쓰려면 ..

헤더파일에

#include<arpa/inet.h>

추가해야함

그러면

incompatible type for argument 1 of 'inet_ntoa' 라는 에러 발생

inet_ntoa(*(struct in_addr*)&ip->saddr);

이런식으로 해주면 사라짐

ㅠㅠ

728x90

댓글