diff --git a/CHANGES b/CHANGES index 80ab592..15a7e6d 100644 --- a/CHANGES +++ b/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 diff --git a/README b/README index d92eb4a..6bf0463 100644 --- a/README +++ b/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 diff --git a/xio-ip4.c b/xio-ip4.c index d40796b..076ce1f 100644 --- a/xio-ip4.c +++ b/xio-ip4.c @@ -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; } diff --git a/xio-proxy.c b/xio-proxy.c index 984933c..622e2c5 100644 --- a/xio-proxy.c +++ b/xio-proxy.c @@ -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 */