From 5e70d80e7d7752a1df16b871d57fbcd8334a44e6 Mon Sep 17 00:00:00 2001 From: Jakub Hrozek Date: Thu, 2 Oct 2014 07:04:15 +0200 Subject: [PATCH] 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 --- lib/socket_wrapper/socket_wrapper.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/socket_wrapper/socket_wrapper.c b/lib/socket_wrapper/socket_wrapper.c index 7ee5b641065..903eec21537 100644 --- a/lib/socket_wrapper/socket_wrapper.c +++ b/lib/socket_wrapper/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)) { -- 2.11.4.GIT