mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
SO_PROTOCOL is platform-dependent
SO_PROTOCOL is not defined on all platforms. In particular, OSX doesn't include it and so far I haven't found any compatible declaration. Signed-off-by: Jakub Hrozek <jakub.hrozek@gmail.com> Reviewed-by: Andreas Schneider <asn@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
This commit is contained in:
parent
616364378d
commit
5e70d80e7d
@ -3169,6 +3169,8 @@ static int swrap_getsockopt(int s, int level, int optname,
|
||||
*(int *)optval = si->family;
|
||||
return 0;
|
||||
#endif /* SO_DOMAIN */
|
||||
|
||||
#ifdef SO_PROTOCOL
|
||||
case SO_PROTOCOL:
|
||||
if (optval == NULL || optlen == NULL ||
|
||||
*optlen < (socklen_t)sizeof(int)) {
|
||||
@ -3179,6 +3181,7 @@ static int swrap_getsockopt(int s, int level, int optname,
|
||||
*optlen = sizeof(int);
|
||||
*(int *)optval = si->protocol;
|
||||
return 0;
|
||||
#endif /* SO_PROTOCOL */
|
||||
case SO_TYPE:
|
||||
if (optval == NULL || optlen == NULL ||
|
||||
*optlen < (socklen_t)sizeof(int)) {
|
||||
|
Loading…
Reference in New Issue
Block a user