add freebsd support
Including FreeBSD in preprocessor conditionals for APPLE fixes issues with UDP make_socket, as described in issue #488. Signed-off-by: Michael Gary Dodson <md403@cam.ac.uk>
This commit is contained in:
parent
b46bd7ffff
commit
b513eaac00
1 changed files with 4 additions and 4 deletions
|
@ -32,9 +32,9 @@
|
|||
#include <fcntl.h>
|
||||
#endif
|
||||
|
||||
#ifdef __APPLE__
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
#include <sys/sockio.h>
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __APPLE__ || __FreeBSD__ */
|
||||
#endif /* LWIP_SOCKET */
|
||||
|
||||
dds_return_t
|
||||
|
@ -316,13 +316,13 @@ ddsrt_setsockopt(
|
|||
goto err_setsockopt;
|
||||
}
|
||||
|
||||
#if defined(__APPLE__)
|
||||
#if defined(__APPLE__) || defined(__FreeBSD__)
|
||||
if (level == SOL_SOCKET && optname == SO_REUSEADDR &&
|
||||
setsockopt(sock, level, SO_REUSEPORT, optval, optlen) == -1)
|
||||
{
|
||||
goto err_setsockopt;
|
||||
}
|
||||
#endif /* __APPLE__ */
|
||||
#endif /* __APPLE__ || __FreeBSD__ */
|
||||
|
||||
return DDS_RETCODE_OK;
|
||||
err_setsockopt:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue