=?us-ascii?Q?=3D=3FGBK=3FB=3F48a6vQ=3D=3D=3F=3D?=
2011-10-29 08:25:41 UTC
My system is opensuse 11.4,I download the source code (v1.8) and compile it .During 'make',a small error occured.I didn't record it .but i will try to explain it to you.
file: ./c/unix/socket.c
line: 354
func:gethostbyname_thread
host->h_addr--->I was told that struct host has no member 'h_addr'
host---------->struct hostent
The same error happend in func s48_get_host_by_name (line 385)
and i checked my defination of struct hostent(netdb.h)
struct hostent
{
char *h_name; /* Official name of host. */
char **h_aliases; /* Alias list. */
int h_addrtype; /* Host address type. */
int h_length; /* Length of address. */
char **h_addr_list; /* List of addresses from name server. */
#if defined __USE_MISC || defined __USE_GNU
# define h_addr h_addr_list[0] /* Address, for backward compatibility.*/
#endif
};
It seems some thing wrong with the marco defination.so i changed the h_addr to
h_addr_list[0] ,and it wored.I don't know whether other distributions has this problem.
hope it maybe helps to you
file: ./c/unix/socket.c
line: 354
func:gethostbyname_thread
host->h_addr--->I was told that struct host has no member 'h_addr'
host---------->struct hostent
The same error happend in func s48_get_host_by_name (line 385)
and i checked my defination of struct hostent(netdb.h)
struct hostent
{
char *h_name; /* Official name of host. */
char **h_aliases; /* Alias list. */
int h_addrtype; /* Host address type. */
int h_length; /* Length of address. */
char **h_addr_list; /* List of addresses from name server. */
#if defined __USE_MISC || defined __USE_GNU
# define h_addr h_addr_list[0] /* Address, for backward compatibility.*/
#endif
};
It seems some thing wrong with the marco defination.so i changed the h_addr to
h_addr_list[0] ,and it wored.I don't know whether other distributions has this problem.
hope it maybe helps to you