[cig-commits] [commit] master: guard symbol usage of link.h only when we have it (6748db2)
cig_noreply at geodynamics.org
cig_noreply at geodynamics.org
Fri Oct 10 12:07:25 PDT 2014
Repository : https://github.com/geodynamics/aspect
On branch : master
Link : https://github.com/geodynamics/aspect/compare/2758b7d2151ff6fcfb93f9d83a03668891b9b30b...2e8a68d9e94d9a4bcd4e633cd06c203c2f7e992c
>---------------------------------------------------------------
commit 6748db2d580d8b372b828585d0003b1abb9e1885
Author: Timo Heister <timo.heister at gmail.com>
Date: Fri Oct 10 13:40:04 2014 -0400
guard symbol usage of link.h only when we have it
This should fix compilation on mac os, where we have no link.h. Note that
we are not calling get_names_of_shared_libs() in this case anyway.
>---------------------------------------------------------------
6748db2d580d8b372b828585d0003b1abb9e1885
source/main.cc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/source/main.cc b/source/main.cc
index 36e9b9e..b490c48 100644
--- a/source/main.cc
+++ b/source/main.cc
@@ -111,6 +111,8 @@ get_dimension(const std::string ¶meter_filename)
#if ASPECT_USE_SHARED_LIBS==1
+
+#ifdef ASPECT_HAVE_LINK_H
// collect the names of the shared libraries linked to by this program. this
// function is a callback for the dl_iterate_phdr() function we call below
int get_names_of_shared_libs (struct dl_phdr_info *info,
@@ -120,6 +122,7 @@ int get_names_of_shared_libs (struct dl_phdr_info *info,
reinterpret_cast<std::set<std::string>*>(data)->insert (info->dlpi_name);
return 0;
}
+#endif
// make sure the list of shared libraries we currently link with
More information about the CIG-COMMITS
mailing list