#include <errno.h> /* errno */
#include <sys/time.h> /* "input_network.h" */
-#ifdef SYS_BSD
+#if defined(SYS_BSD) || defined(SYS_BEOS)
#include <sys/socket.h> /* struct sockaddr */
#endif
#include <netdb.h> /* servent, getservbyname(), hostent, gethostbyname() */
#include <netinet/in.h> /* sockaddr_in, htons(), htonl() */
+#include "threads.h"
#include "common.h"
#include "config.h"
#include "mtime.h"
-#include "threads.h"
#include "netutils.h"
#include "input.h"
&i_socket_option,
sizeof( i_socket_option ) ) == (-1) )
{
- intf_ErrMsg("error: can't configure socket (%s)\n", strerror(errno));
+ intf_ErrMsg("error: can't configure socket (SO_REUSEADDR: %s)\n", strerror(errno));
close( p_input->i_handle );
return( 1 );
}
+#ifndef SYS_BEOS
/* Increase the receive buffer size to 1/2MB (8Mb/s during 1/2s) to avoid
* packet loss caused by scheduling problems */
i_socket_option = 524288;
&i_socket_option,
sizeof( i_socket_option ) ) == (-1) )
{
- intf_ErrMsg("error: can't configure socket (%s)\n", strerror(errno));
+ intf_ErrMsg("error: can't configure socket (SO_RCVBUF: %s)\n", strerror(errno));
close( p_input->i_handle );
return( 1 );
}
+#endif /* SYS_BEOS */
/*
* Bind the socket