gethostbynameとinet_ntopについての質問です。
------------------------------
#include <stdio.h>
#include <sys/socket.h>
#include <netdb.h>

int main(void)
{
char*ptr, **pptr;
charstr[4];
struct hostent*hptr;

ptr="www.asahi.com";
hptr=gethostbyname(ptr);
pptr = hptr->h_addr_list;
printf("address:%s\n",inet_ntop(hptr->h_addrtype, *pptr, str, sizeof(str)));
}
------------------------------
以上のような短いプログラムを作ったのですが出力が
address:(null)となってしまいIPアドレスが表示できません。
asahi以外にも試したのですが同じ結果になりました。
どうしたら正常に表示できるのでしょうか。ちなみに
他のhostent構造体の例えばh_name等は正常に表示できました。
OSはsuse10.0 x86_64版です。