mirror of
https://repo.or.cz/socat.git
synced 2024-12-22 15:32:35 +00:00
Fixed SO_PROTOCOL on new Illumos
This commit is contained in:
parent
642b729622
commit
0454c4fa43
2 changed files with 11 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -72,6 +72,10 @@ Porting:
|
|||
in sys/stropts.h
|
||||
Thanks to Andy Fiddaman for sending a patch.
|
||||
|
||||
On latest Illumos, compilation failed due to new unexpected SO_PROTOCOL
|
||||
implementation.
|
||||
Thanks to Andy Fiddaman for sending a patch.
|
||||
|
||||
Building:
|
||||
Makefile.in: procan.o build requires srcdir prefix for explicit source
|
||||
file.
|
||||
|
|
|
@ -6,14 +6,19 @@
|
|||
#define __xio_socket_h_included 1
|
||||
|
||||
/* SO_PROTOTYPE is defined on Solaris, HP-UX
|
||||
SO_PROTOCOL in Linux, is the better name, but came much later */
|
||||
SO_PROTOCOL in Linux, is the better name, but came much later, now
|
||||
standardised in POSIX 2024
|
||||
illumos defines both, with SO_PROTOCOL as an alias of SO_PROTOTYPE */
|
||||
#ifdef SO_PROTOCOL
|
||||
# undef SO_PROTOTYPE
|
||||
# ifndef SO_PROTOTYPE
|
||||
# define SO_PROTOTYPE SO_PROTOCOL
|
||||
# endif
|
||||
#else
|
||||
# ifdef SO_PROTOTYPE
|
||||
# define SO_PROTOCOL SO_PROTOTYPE
|
||||
# else
|
||||
/* Even when SO_PROTOCOL is not available for setsockopt() Socat uses it
|
||||
internally as option for 3rd arg of socket() e.a. */
|
||||
# define SO_PROTOCOL 0x9999
|
||||
# define SO_PROTOTYPE SO_PROTOCOL
|
||||
# endif
|
||||
|
|
Loading…
Reference in a new issue