diff --git a/CHANGES b/CHANGES index f09da57..d692c35 100644 --- a/CHANGES +++ b/CHANGES @@ -67,6 +67,8 @@ Porting: Solaris requires that termios options are always applied to the slave side of PTY. + Fixed ancillary messages on Solaris. + Features: Filan prints target of symlink when appropriate Test: FILANSYMLINK diff --git a/compat.h b/compat.h index aa5d098..6999923 100644 --- a/compat.h +++ b/compat.h @@ -31,6 +31,10 @@ extern char **environ; # undef PIPE_STATES_SOCKET #endif +#if defined(__sun) || defined(__sun__) || defined(__SunOS) +# define XIO_ANCILLARY_TYPE_SOLARIS 1 +#endif + /*****************************************************************************/ /* substitute some features that might be missing on some platforms */ diff --git a/xio-ip.c b/xio-ip.c index 11f0797..690caa0 100644 --- a/xio-ip.c +++ b/xio-ip.c @@ -618,7 +618,11 @@ int xiolog_ancillary_ip(struct cmsghdr *cmsg, int *num, cmsgtype = "IP_OPTIONS"; cmsgname = "options"; cmsgctr = -1; /*!!!*/ break; +#if XIO_ANCILLARY_TYPE_SOLARIS + case IP_RECVTOS: +#else case IP_TOS: +#endif cmsgtype = "IP_TOS"; cmsgname = "tos"; cmsgctr = msglen; break; case IP_TTL: /* Linux */