From 84cba33aab34236abc5aa69c2a364e4ef5809047 Mon Sep 17 00:00:00 2001 From: curt Date: Sat, 20 Nov 2004 19:11:08 +0000 Subject: [PATCH] FreeBSD fix. --- simgear/scene/sky/cloud.cxx | 5 +---- simgear/screen/extensions.cxx | 4 ++++ 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/simgear/scene/sky/cloud.cxx b/simgear/scene/sky/cloud.cxx index 72b29f2d..a2b3b662 100644 --- a/simgear/scene/sky/cloud.cxx +++ b/simgear/scene/sky/cloud.cxx @@ -21,15 +21,13 @@ // #include #include -#if defined (__APPLE__) +#if defined (__APPLE__) || defined (__FreeBSD__) // any C++ header file undefines isinf and isnan // so this should be included before inline int (isinf)(double r) { return isinf(r); } inline int (isnan)(double r) { return isnan(r); } #endif -// #include STL_IOSTREAM - #include #include @@ -634,7 +632,6 @@ bool SGCloudLayer::repaint( sgVec3 fog_color ) { return true; } - // reposition the cloud layer at the specified origin and orientation // lon specifies a rotation about the Z axis // lat specifies a rotation about the new Y axis diff --git a/simgear/screen/extensions.cxx b/simgear/screen/extensions.cxx index 8f979790..b3a1e9f4 100644 --- a/simgear/screen/extensions.cxx +++ b/simgear/screen/extensions.cxx @@ -113,7 +113,11 @@ void *SGGetGLProcAddress(const char *func) { if (libHandle != NULL) { fptr = dlsym(libHandle, func); +#if defined (__FreeBSD__) + const char *error = dlerror(); +#else char *error = dlerror(); +#endif if (error) SG_LOG(SG_GENERAL, SG_INFO, error); } -- 2.39.5