X-Git-Url: https://main.carlh.net/gitweb/?a=blobdiff_plain;f=libs%2Fmidi%2B%2B2%2Fipmidi_port.cc;h=567df99335e4c41a7d4cc167e1c13d081189eca8;hb=23e7cf10191270d70357ccf0ed9294f020c7b7ab;hp=59606bffb20af40e4e36c9a453ef36b59dcf90b2;hpb=eb2c4196200ee314e2d116ca30311c15c86c519f;p=ardour.git diff --git a/libs/midi++2/ipmidi_port.cc b/libs/midi++2/ipmidi_port.cc index 59606bffb2..567df99335 100644 --- a/libs/midi++2/ipmidi_port.cc +++ b/libs/midi++2/ipmidi_port.cc @@ -29,13 +29,13 @@ #undef O_NONBLOCK #define O_NONBLOCK 0 #endif -#if defined(WIN32) +#if defined(PLATFORM_WINDOWS) #include #else #include #endif -#if defined(WIN32) +#if defined(PLATFORM_WINDOWS) static WSADATA g_wsaData; typedef int socklen_t; #else @@ -44,9 +44,6 @@ typedef int socklen_t; inline void closesocket(int s) { ::close(s); } #endif -#include -#include - #include "pbd/xml++.h" #include "pbd/error.h" #include "pbd/failed_constructor.h" @@ -120,7 +117,7 @@ get_address (int sock, struct in_addr *inaddr, const string& ifname ) { // Get interface address from supplied name. -#if !defined(WIN32) +#if !defined(PLATFORM_WINDOWS) struct ifreq ifr; ::strncpy(ifr.ifr_name, ifname.c_str(), sizeof(ifr.ifr_name)); @@ -149,13 +146,13 @@ get_address (int sock, struct in_addr *inaddr, const string& ifname ) return false; -#endif // !WIN32 +#endif // !PLATFORM_WINDOWS' } bool IPMIDIPort::open_sockets (int base_port, const string& ifname) { -#if !defined(WIN32) +#if !defined(PLATFORM_WINDOWS) int protonum = 0; struct protoent *proto = ::getprotobyname("IP"); @@ -254,7 +251,7 @@ IPMIDIPort::open_sockets (int base_port, const string& ifname) return true; #else return false; -#endif // !WIN32 +#endif // !PLATFORM_WINDOWS' } int