Hi all.

Please commit the diff below to SimGear.

Sometime in October 2010 SimGear had its PLIB net dependency removed. As a
result, socket code on FreeBSD (and possibly other *BSD) was broken. This
was manifest as silent failure to make outgoing connections -- no error
messages were logged (--log-level=debug).

-ivan


diff --git a/simgear/io/raw_socket.hxx b/simgear/io/raw_socket.hxx
index f68ff10..4eb3044 100644
--- a/simgear/io/raw_socket.hxx
+++ b/simgear/io/raw_socket.hxx
@@ -25,7 +25,7 @@

 #include <errno.h>

-#if defined(__APPLE__)
+#if defined(__APPLE__) || defined(__FreeBSD__)
 #  include <netinet/in.h>
 #endif

@@ -38,7 +38,7 @@ namespace simgear
 class IPAddress
 {
   /* DANGER!!!  This MUST match 'struct sockaddr_in' exactly! */
-#ifdef __APPLE__
+#if defined(__APPLE__) || defined(__FreeBSD__)
   __uint8_t      sin_len;
   __uint8_t      sin_family;
   in_port_t      sin_port;
------------------------------------------------------------------------------
The ultimate all-in-one performance toolkit: Intel(R) Parallel Studio XE:
Pinpoint memory and threading errors before they happen.
Find and fix more than 250 security defects in the development cycle.
Locate bottlenecks in serial and parallel code that limit performance.
http://p.sf.net/sfu/intel-dev2devfeb
_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to