1
0
Fork 0
mirror of https://repo.or.cz/socat.git synced 2025-07-11 22:23:24 +00:00

AIX: cast for hstrerror()

This commit is contained in:
Gerhard Rieger 2008-10-12 18:56:01 +02:00
parent 01f990310e
commit bc4fefdc50
4 changed files with 15 additions and 8 deletions

View file

@ -244,9 +244,11 @@ int _xioopen_proxy_prepare(struct proxyvars *proxyvars, struct opt *opts,
host = Gethostbyname(targetname);
if (host == NULL) {
int level = E_WARN;
/* note: cast is req on AIX: */
Msg2(level, "gethostbyname(\"%s\"): %s", targetname,
h_errno == NETDB_INTERNAL ? strerror(errno) :
hstrerror(h_errno)/*0 h_messages[h_errno-1]*/);
h_errno == NETDB_INTERNAL ? strerror(errno) :
(char *)hstrerror(h_errno)/*0 h_messages[h_errno-1]*/);
proxyvars->targetaddr = strdup(targetname);
} else {
#define LEN 16 /* www.xxx.yyy.zzz\0 */