summaryrefslogtreecommitdiffstats
path: root/setupdwfl.h
diff options
context:
space:
mode:
Diffstat (limited to 'setupdwfl.h')
-rw-r--r--setupdwfl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/setupdwfl.h b/setupdwfl.h
index 743ce668..0c3cc63e 100644
--- a/setupdwfl.h
+++ b/setupdwfl.h
@@ -16,7 +16,15 @@
#include <string>
#include <vector>
+#if defined(HAVE_TR1_MEMORY)
#include <tr1/memory>
+using std::tr1::shared_ptr;
+#elif defined(HAVE_BOOST_SHARED_PTR_HPP)
+#include <boost/shared_ptr.hpp>
+using boost::shared_ptr;
+#else
+#error "No shared_ptr implementation found; get boost or modern g++"
+#endif
extern "C" {
#include <elfutils/libdwfl.h>
@@ -29,7 +37,7 @@ public:
~StapDwfl() { if (dwfl) dwfl_end (dwfl); }
Dwfl *dwfl;
};
-typedef std::tr1::shared_ptr<StapDwfl> DwflPtr;
+typedef shared_ptr<StapDwfl> DwflPtr;
DwflPtr setup_dwfl_kernel(const std::string &name,
unsigned *found,