]> git.mxchange.org Git - flightgear.git/blobdiff - utils/GPSsmooth/MIDG_main.cxx
Merge branch 'next' into durk-atc
[flightgear.git] / utils / GPSsmooth / MIDG_main.cxx
index 613f1d39d8c77d40e0677b0397a410c0d7d29a0d..118c6198bf960c8c0c6190394bb98898a2c3d79c 100644 (file)
@@ -2,16 +2,22 @@
 #  include <config.h>
 #endif
 
+#ifdef HAVE_WINDOWS_H
+#  include <windows.h>
+#else
+#  include <netinet/in.h>       // htonl() ntohl()
+#endif
+
 #include <iostream>
 #include <string>
 
-#include <plib/net.h>
 #include <plib/sg.h>
 
 #include <simgear/constants.h>
 #include <simgear/io/lowlevel.hxx> // endian tests
 #include <simgear/io/sg_file.hxx>
 #include <simgear/io/sg_serial.hxx>
+#include <simgear/io/raw_socket.hxx>
 #include <simgear/math/sg_geodesy.hxx>
 #include <simgear/timing/timestamp.hxx>
 
@@ -27,7 +33,7 @@ using std::string;
 
 
 // Network channels
-static netSocket fdm_sock, ctrls_sock;
+static simgear::Socket fdm_sock, ctrls_sock;
 
 // midg data
 MIDGTrack track;
@@ -394,7 +400,7 @@ int main( int argc, char **argv ) {
 
     // Setup up outgoing network connections
 
-    netInit( &argc,argv ); // We must call this before any other net stuff
+    simgear::Socket::initSockets(); // We must call this before any other net stuff
 
     if ( ! fdm_sock.open( false ) ) {  // open a UDP socket
         cout << "error opening fdm output socket" << endl;