AIX 4.3.3 에서 gcc 2.95 를 이용해서 호스트 네임을 잡아오는 것을 만들
었는데 호스트 네임을 잡질 못합니다.
소스를 보면..
=============================================
#include
#include
main ()
{
struct hostent* hoststruct;
char hostname[255];
gethostname(hostname, 100);
hoststruct = gethostbyname(hostname);
printf("this hostname is %s\n", hoststruct);
}
=============================================
컴파일은 되는데 실행을하면
this hostname is
이렇게만 나옵니다..
좀