#include <errno.h>
#include <stdlib.h>
#include <string.h>
-#if defined(WIN32)
+#ifdef COMPILER_MSVC
+#undef O_NONBLOCK
+#define O_NONBLOCK 0
+#endif
+#if defined(PLATFORM_WINDOWS)
#include <winsock2.h>
#else
#include <netdb.h>
#endif
-#if defined(WIN32)
+#if defined(PLATFORM_WINDOWS)
static WSADATA g_wsaData;
typedef int socklen_t;
#else
inline void closesocket(int s) { ::close(s); }
#endif
-#include <jack/jack.h>
-#include <jack/midiport.h>
-
#include "pbd/xml++.h"
#include "pbd/error.h"
#include "pbd/failed_constructor.h"
{
// 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));
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");
return true;
#else
return false;
-#endif // !WIN32
+#endif // !PLATFORM_WINDOWS'
}
int