diff options
| author | Jakub Hrozek <jakub.hrozek@gmail.com> | 2014-07-02 00:01:04 +0200 |
|---|---|---|
| committer | Andreas Schneider <asn@samba.org> | 2014-07-29 15:03:33 +0200 |
| commit | d9bae3a469d4803003711ae282a52d72905068e9 (patch) | |
| tree | cb0517a500afab2bac27a919cda4b5fce387fde9 /src | |
| parent | 1fcf8726753f38651d009c63d12a179854b506b8 (diff) | |
| download | socket_wrapper-d9bae3a469d4803003711ae282a52d72905068e9.tar.gz socket_wrapper-d9bae3a469d4803003711ae282a52d72905068e9.tar.xz socket_wrapper-d9bae3a469d4803003711ae282a52d72905068e9.zip | |
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>
Diffstat (limited to 'src')
| -rw-r--r-- | src/socket_wrapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
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)) { |
