From 0dffbf9ddb0f44d157d2c09335b79fd6446458cb Mon Sep 17 00:00:00 2001 From: Jonathan Naylor Date: Mon, 22 Apr 2024 13:57:09 +0100 Subject: [PATCH] Allow it to build on Windows again. --- DMRGateway.cpp | 2 +- DMRGateway.vcxproj | 14 ++++++++++++-- UDPSocket.h | 3 ++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/DMRGateway.cpp b/DMRGateway.cpp index 701ad82..c9f984f 100644 --- a/DMRGateway.cpp +++ b/DMRGateway.cpp @@ -70,7 +70,7 @@ static void sigHandler(int signum) const char* HEADER1 = "This software is for use on amateur radio networks only,"; const char* HEADER2 = "it is to be used for educational purposes only. Its use on"; const char* HEADER3 = "commercial networks is strictly prohibited."; -const char* HEADER4 = "Copyright(C) 2017-2022 by Jonathan Naylor, G4KLX and others"; +const char* HEADER4 = "Copyright(C) 2017-2024 by Jonathan Naylor, G4KLX and others"; int main(int argc, char** argv) { diff --git a/DMRGateway.vcxproj b/DMRGateway.vcxproj index 9276e93..db7d4ec 100644 --- a/DMRGateway.vcxproj +++ b/DMRGateway.vcxproj @@ -94,6 +94,9 @@ true ws2_32.lib;%(AdditionalDependencies) + + prebuild.cmd + @@ -109,10 +112,11 @@ ws2_32.lib;%(AdditionalDependencies) - "$(ProjectDir)prebuild.cmd" $(ProjectDir) + prebuild.cmd - prebuild.cmd generates GitVersion.h from git refs heads master + + @@ -132,6 +136,9 @@ true ws2_32.lib;%(AdditionalDependencies) + + prebuild.cmd + @@ -150,6 +157,9 @@ true ws2_32.lib;%(AdditionalDependencies) + + prebuild.cmd + diff --git a/UDPSocket.h b/UDPSocket.h index 28e350c..75228a3 100644 --- a/UDPSocket.h +++ b/UDPSocket.h @@ -69,10 +69,11 @@ private: unsigned short m_localPort; #if defined(_WIN32) || defined(_WIN64) SOCKET m_fd; + int m_af; #else int m_fd; -#endif sa_family_t m_af; +#endif }; #endif