Fix compile issues.

This commit is contained in:
Jonathan Naylor 2018-11-06 19:52:30 +00:00
parent 70840a10c2
commit dd4549a753
6 changed files with 54 additions and 24 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (C) 2006-2014 by Jonathan Naylor G4KLX
* Copyright (C) 2006-2014,2018 by Jonathan Naylor G4KLX
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -37,6 +37,34 @@ m_fd(-1)
#endif
}
CUDPReaderWriter::CUDPReaderWriter(unsigned int port) :
m_address(),
m_port(port),
m_addr(),
m_fd(-1)
{
#if defined(__WINDOWS__)
WSAData data;
int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data);
if (wsaRet != 0)
wxLogError(wxT("Error from WSAStartup"));
#endif
}
CUDPReaderWriter::CUDPReaderWriter() :
m_address(),
m_port(0U),
m_addr(),
m_fd(-1)
{
#if defined(__WINDOWS__)
WSAData data;
int wsaRet = ::WSAStartup(MAKEWORD(2, 2), &data);
if (wsaRet != 0)
wxLogError(wxT("Error from WSAStartup"));
#endif
}
CUDPReaderWriter::~CUDPReaderWriter()
{
#if defined(__WINDOWS__)