From d9bae3a469d4803003711ae282a52d72905068e9 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Wed, 2 Jul 2014 00:01:04 +0200 Subject: 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 Reviewed-by: Andreas Schneider Reviewed-by: Michael Adam --- src/socket_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/socket_wrapper.c b/src/socket_wrapper.c index 7ee5b64..903eec2 100644 --- a/src/socket_wrapper.c +++ b/src/socket_wrapper.c @@ -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)) { -- cgit