From ab8918fa733efd1660761c9f50ced74948ce724c Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Thu, 11 Jul 2013 13:00:42 -0400 Subject: [PATCH] Changes to get IPMIDIPort to compile(but not functional) on MinGW --- libs/midi++2/ipmidi_port.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/midi++2/ipmidi_port.cc b/libs/midi++2/ipmidi_port.cc index c90a3dbe6f..7f166f5b24 100644 --- a/libs/midi++2/ipmidi_port.cc +++ b/libs/midi++2/ipmidi_port.cc @@ -25,7 +25,11 @@ #include #include #include +#if defined(WIN32) +#include +#else #include +#endif #if defined(WIN32) static WSADATA g_wsaData; @@ -147,6 +151,7 @@ get_address (int sock, struct in_addr *inaddr, const string& ifname ) bool IPMIDIPort::open_sockets (int base_port, const string& ifname) { +#if !defined(WIN32) int protonum = 0; struct protoent *proto = ::getprotobyname("IP"); @@ -243,6 +248,9 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname) } return true; +#else + return false; +#endif // !WIN32 } int