diff --git a/engine/server/sv_mvd.c b/engine/server/sv_mvd.c index 2523d52a4..0c90bfdcb 100644 --- a/engine/server/sv_mvd.c +++ b/engine/server/sv_mvd.c @@ -22,6 +22,49 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #ifndef CLIENTONLY #include "winquake.h" +#ifdef _WIN32 + +#define EWOULDBLOCK WSAEWOULDBLOCK +#define EMSGSIZE WSAEMSGSIZE +#define ECONNRESET WSAECONNRESET +#define ECONNABORTED WSAECONNABORTED +#define ECONNREFUSED WSAECONNREFUSED +#define EADDRNOTAVAIL WSAEADDRNOTAVAIL + +#define qerrno WSAGetLastError() +#else +#define qerrno errno + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#ifdef sun +#include +#endif + +#ifdef NeXT +#include +#endif + +#if defined(__MORPHOS__) && !defined(ixemul) +#define closesocket CloseSocket +#define ioctlsocket IoctlSocket +#else +#define closesocket close +#define ioctlsocket ioctl +#endif +#endif + + void SV_MVDStop_f (void); #define demo_size_padding 0x1000 @@ -1888,45 +1931,6 @@ void SV_MVDEasyRecord_f (void) SV_MVD_Record (SV_InitRecordFile(name2)); } - -#ifdef _WIN32 - -#define EWOULDBLOCK WSAEWOULDBLOCK -#define EMSGSIZE WSAEMSGSIZE -#define ECONNRESET WSAECONNRESET -#define ECONNABORTED WSAECONNABORTED -#define ECONNREFUSED WSAECONNREFUSED -#define EADDRNOTAVAIL WSAEADDRNOTAVAIL - -#define qerrno WSAGetLastError() -#else -#define qerrno errno - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include - -#ifdef sun -#include -#endif - -#ifdef NeXT -#include -#endif - -#define closesocket close -#define ioctlsocket ioctl -#endif - - int MVD_StreamStartListening(int port) { int sock;