Making buildable under OpenBSD.
[ardour.git] / libs / midi++2 / midi++ / ipmidi_port.h
index a0566125143319a9176bb4b737a9b7ed80767fa0..8cefe09a40888c4506abdd48cd202e9c38ac071b 100644 (file)
@@ -1,5 +1,5 @@
 /*
-    Copyright (C) 1998-2010 Paul Barton-Davis 
+    Copyright (C) 1998-2010 Paul Barton-Davis
     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
     the Free Software Foundation; either version 2 of the License, or
 #include <iostream>
 #if defined(PLATFORM_WINDOWS)
 #include <winsock.h>
-#elif defined(__FREE_BSD__)
+#elif defined(__FreeBSD__) || defined(__OpenBSD__)
 #include <netinet/in.h>
 #include <sys/socket.h>
+#if defined(__FreeBSD__)
 #include <sys/_sockaddr_storage.h>
+#endif
 #include <arpa/inet.h>
 #include <netinet/ip_carp.h>
 #include <sys/types.h>
@@ -58,10 +60,10 @@ class LIBMIDIPP_API IPMIDIPort : public Port {
     IPMIDIPort (int base_port = lowest_ipmidi_port_default, const std::string& ifname = std::string());
     IPMIDIPort (const XMLNode&);
     ~IPMIDIPort ();
-    
+
     XMLNode& get_state () const;
     void set_state (const XMLNode&);
-    
+
     int write (const byte *msg, size_t msglen, timestamp_t timestamp);
     int read (byte *buf, size_t bufsize);
     void parse (framecnt_t timestamp);
@@ -69,11 +71,11 @@ class LIBMIDIPP_API IPMIDIPort : public Port {
 
     static const int lowest_ipmidi_port_default = 21928;
 
-private:       
+private:
     int sockin;
     int sockout;
     struct sockaddr_in addrout;
-    Glib::Threads::Mutex write_lock;    
+    Glib::Threads::Mutex write_lock;
 
     bool open_sockets (int base_port, const std::string& ifname);
     void close_sockets ();