From f2428e961f6dd851763e12b02388e2bca19cbb4f Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Wed, 2 Oct 2013 11:29:56 +0000 Subject: [PATCH] From Dmitry Marakasov, "These are FreeBSD bits for src/osgPlugins/osc/osc/OscHostEndianness.h, required to build newever OSG on this OS. Also corrects file name in the error message - I was confused not to find OSCHostEndianness.h after I've got this error. Tested by successfully building OSG 3.2.0 with this patch on FreeBSD 9.1." --- src/osgPlugins/osc/osc/OscHostEndianness.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/osgPlugins/osc/osc/OscHostEndianness.h b/src/osgPlugins/osc/osc/OscHostEndianness.h index ca52b930f..3720ea63f 100644 --- a/src/osgPlugins/osc/osc/OscHostEndianness.h +++ b/src/osgPlugins/osc/osc/OscHostEndianness.h @@ -60,6 +60,15 @@ #else #error Unknown machine endianness detected. #endif + #elif defined(__FreeBSD__) + #include + #if (_BYTE_ORDER == _LITTLE_ENDIAN) + #define __LITTLE_ENDIAN__ + #elif (_BYTE_ORDER == _BIG_ENDIAN) + #define __BIG_ENDIAN__ + #else + #error Unknown machine endianness detected. + #endif #endif #if defined(__LITTLE_ENDIAN__) @@ -74,7 +83,7 @@ #else - #error please edit OSCHostEndianness.h to configure endianness + #error please edit OscHostEndianness.h to configure endianness #endif