mirror of
https://github.com/moparisthebest/socat
synced 2024-12-22 06:58:47 -05:00
AIX: cast for hstrerror()
This commit is contained in:
parent
01f990310e
commit
bc4fefdc50
7
CHANGES
7
CHANGES
@ -98,8 +98,11 @@ corrections:
|
||||
feature (thanks to Pavan Gadi for reporting this bug)
|
||||
|
||||
porting:
|
||||
socat should now build under MacOS X 10.4 (thanks to Camillo Lugaresi for
|
||||
providing the patch)
|
||||
socat should now build under MacOS X 10.4 (thanks to Camillo Lugaresi
|
||||
for providing the patch)
|
||||
|
||||
socat compiles and runs on AIX (thanks to Andi Mather for testing and
|
||||
patching)
|
||||
|
||||
further changes:
|
||||
filan -s prefixes output with FD number if more than one FD
|
||||
|
4
README
4
README
@ -45,11 +45,11 @@ distributions.
|
||||
platforms
|
||||
---------
|
||||
|
||||
socat 1.6.0 was compiled and more or less successfully tested under the
|
||||
socat 1.7.0 was compiled and more or less successfully tested under the
|
||||
following operating systems:
|
||||
|
||||
SuSE Linux 10.1 on x86
|
||||
AIX 5.2 on PPC with gcc
|
||||
AIX 5.3 on PPC with gcc
|
||||
Solaris 9 on Sparc with gcc
|
||||
FreeBSD 6.1 on x86
|
||||
HP-UX B 11.11 on PA-RISC with gcc
|
||||
|
@ -32,9 +32,10 @@ int xioparsenetwork_ip4(const char *rangename, struct xiorange *range) {
|
||||
netmask_in->s_addr = htonl((0xffffffff << (32-bits)));
|
||||
} else if (delimpos = strchr(rangename1, ':')) {
|
||||
if ((maskaddr = Gethostbyname(delimpos+1)) == NULL) {
|
||||
/* note: cast is req on AIX: */
|
||||
Error2("gethostbyname(\"%s\"): %s", delimpos+1,
|
||||
h_errno == NETDB_INTERNAL ? strerror(errno) :
|
||||
hstrerror(h_errno));
|
||||
(char *)hstrerror(h_errno));
|
||||
return STAT_NORETRY;
|
||||
}
|
||||
netmask_in->s_addr = *(uint32_t *)maskaddr->h_addr_list[0];
|
||||
@ -47,9 +48,10 @@ int xioparsenetwork_ip4(const char *rangename, struct xiorange *range) {
|
||||
struct hostent *nameaddr;
|
||||
*delimpos = 0;
|
||||
if ((nameaddr = Gethostbyname(rangename1)) == NULL) {
|
||||
/* note: cast is req on AIX: */
|
||||
Error2("gethostbyname(\"%s\"): %s", rangename1,
|
||||
h_errno == NETDB_INTERNAL ? strerror(errno) :
|
||||
hstrerror(h_errno));
|
||||
(char *)hstrerror(h_errno));
|
||||
free(rangename1);
|
||||
return STAT_NORETRY;
|
||||
}
|
||||
|
@ -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]*/);
|
||||
(char *)hstrerror(h_errno)/*0 h_messages[h_errno-1]*/);
|
||||
|
||||
proxyvars->targetaddr = strdup(targetname);
|
||||
} else {
|
||||
#define LEN 16 /* www.xxx.yyy.zzz\0 */
|
||||
|
Loading…
Reference in New Issue
Block a user