From: David Elliott <dfe@tgwbd.org>
Date: Mon, 17 Jan 2005 02:45:32 +0000 (+0000)
Subject: Make this compile on Darwin.  Vadim, could you please check this is correct?
X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/d8e342b79ef4e77130afc92b6121fd691cb289bd

Make this compile on Darwin.  Vadim, could you please check this is correct?


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31423 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---

diff --git a/src/unix/dlunix.cpp b/src/unix/dlunix.cpp
index 30fdae4f36..fcad9a5671 100644
--- a/src/unix/dlunix.cpp
+++ b/src/unix/dlunix.cpp
@@ -33,6 +33,10 @@
     #include "wx/log.h"
 #endif
 
+#if defined(__DARWIN__)
+    #include <dlfcn.h>
+#endif
+
 #if defined(HAVE_DLOPEN) || defined(__DARWIN__)
     #define USE_POSIX_DL_FUNCS
 #elif !defined(HAVE_SHL_LOAD)
@@ -226,7 +230,7 @@ void wxDynamicLibrary::Unload(wxDllType handle)
     shl_unload(handle);
 #endif // USE_POSIX_DL_FUNCS/!USE_POSIX_DL_FUNCS
 
-#ifdef USE_POSIX_DL_FUNCS
+#if defined(USE_POSIX_DL_FUNCS) && defined(wxHAVE_DYNLIB_ERROR)
     if ( rc != 0 )
         Error();
 #endif