mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 23:42:34 +00:00
AIX: Fixed runtime issues
This commit is contained in:
parent
967e2b24b5
commit
e1a2e37480
4 changed files with 20 additions and 12 deletions
6
CHANGES
6
CHANGES
|
@ -15,6 +15,12 @@ Porting:
|
|||
Adapted include requirements for IPv6
|
||||
Guarded MSG_DONTWAIT
|
||||
|
||||
Continued porting Socat to AIX-7.1 - Fixed some runtime errors:
|
||||
UNIX domain sockets of type SEQPACKET are not available.
|
||||
Connecting to UNIX datagram socket fails with EPROTONOSUPPORT (vs.
|
||||
EPROTOTYPE on most other OSes).
|
||||
Streams: Must not push ldterm when it is already active (hangs).
|
||||
|
||||
####################### V 1.7.4.2:
|
||||
|
||||
Corrections:
|
||||
|
|
|
@ -89,7 +89,7 @@ static int xioopen_gopen(int argc, const char *argv[], struct opt *opts, int xio
|
|||
if ((result = _xioopen_open(filename, openflags, opts)) < 0)
|
||||
return result;
|
||||
#ifdef I_PUSH
|
||||
if (S_ISCHR(st_mode)) {
|
||||
if (S_ISCHR(st_mode) && Ioctl(result, I_FIND, "ldterm\0") == 0) {
|
||||
Ioctl(result, I_PUSH, "ptem\0\0\0"); /* pad string length ... */
|
||||
Ioctl(result, I_PUSH, "ldterm\0"); /* ... to requirements of ... */
|
||||
Ioctl(result, I_PUSH, "ttcompat"); /* ... AdressSanitizer */
|
||||
|
|
|
@ -2219,8 +2219,10 @@ xiosocket(struct opt *opts, int pf, int socktype, int proto, int msglevel) {
|
|||
retropt_int(opts, OPT_SO_PROTOTYPE, &proto);
|
||||
result = Socket(pf, socktype, proto);
|
||||
if (result < 0) {
|
||||
int _errno = errno;
|
||||
Msg4(msglevel, "socket(%d, %d, %d): %s",
|
||||
pf, socktype, proto, strerror(errno));
|
||||
errno = _errno;
|
||||
return -1;
|
||||
}
|
||||
return result;
|
||||
|
|
22
xio-unix.c
22
xio-unix.c
|
@ -576,11 +576,11 @@ _xioopen_unix_client(xiosingle_t *xfd, int xioflags, unsigned groups,
|
|||
/* xfd->dtype = DATA_STREAM; // is default */
|
||||
/* this function handles AF_UNIX with EPROTOTYPE specially for us */
|
||||
if ((result =
|
||||
xioopen_connect(xfd,
|
||||
needbind?&us:NULL, uslen,
|
||||
&them.soa, themlen,
|
||||
opts, pf, socktype?socktype:SOCK_STREAM, protocol,
|
||||
false)) == 0)
|
||||
_xioopen_connect(xfd,
|
||||
needbind?&us:NULL, uslen,
|
||||
&them.soa, themlen,
|
||||
opts, pf, socktype?socktype:SOCK_STREAM, protocol,
|
||||
false, E_INFO)) == 0)
|
||||
break;
|
||||
if (errno != EPROTOTYPE || socktype != 0)
|
||||
break;
|
||||
|
@ -590,13 +590,13 @@ _xioopen_unix_client(xiosingle_t *xfd, int xioflags, unsigned groups,
|
|||
|
||||
socktype = SOCK_SEQPACKET;
|
||||
if ((result =
|
||||
xioopen_connect(xfd,
|
||||
needbind?&us:NULL, uslen,
|
||||
(struct sockaddr *)&them, themlen,
|
||||
opts, pf, SOCK_SEQPACKET, protocol,
|
||||
false)) == 0)
|
||||
_xioopen_connect(xfd,
|
||||
needbind?&us:NULL, uslen,
|
||||
(struct sockaddr *)&them, themlen,
|
||||
opts, pf, SOCK_SEQPACKET, protocol,
|
||||
false, E_INFO)) == 0)
|
||||
break;
|
||||
if (errno != EPROTOTYPE)
|
||||
if (errno != EPROTOTYPE && errno != EPROTONOSUPPORT/*AIX*/)
|
||||
break;
|
||||
if (needbind)
|
||||
Unlink(us.un.sun_path);
|
||||
|
|
Loading…
Reference in a new issue