aboutsummaryrefslogtreecommitdiff
path: root/paludis/tar_merger.cc
diff options
context:
space:
mode:
authorAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 13:05:54 +0100
committerAvatar Ciaran McCreesh <ciaran.mccreesh@googlemail.com> 2010-07-31 13:05:54 +0100
commitb94aea3834f92fded197f4f5de61774cfdf22136 (patch)
treecc01df9e9f6a5c012aa076418d189b8f80bcfbb7 /paludis/tar_merger.cc
parent52d4cbb8a802dc023d7e2e554350dd7f0aae5122 (diff)
downloadpaludis-b94aea3834f92fded197f4f5de61774cfdf22136.tar.gz
paludis-b94aea3834f92fded197f4f5de61774cfdf22136.tar.xz
Handle --disable-pbins better
Diffstat (limited to 'paludis/tar_merger.cc')
-rw-r--r--paludis/tar_merger.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/paludis/tar_merger.cc b/paludis/tar_merger.cc
index 11f5edc9a..41a1e0def 100644
--- a/paludis/tar_merger.cc
+++ b/paludis/tar_merger.cc
@@ -32,6 +32,8 @@
#include <dlfcn.h>
#include <stdint.h>
+#include "config.h"
+
#define STUPID_CAST(type, val) reinterpret_cast<type>(reinterpret_cast<uintptr_t>(val))
using namespace paludis;
@@ -56,6 +58,10 @@ namespace
TarMergerHandle()
{
+#if ! ENABLE_PBINS
+ throw NotAvailableError("Paludis was built without support for pbins");
+#endif
+
handle = ::dlopen(("libpaludistarextras_" + stringify(PALUDIS_PC_SLOT) + ".so").c_str(), RTLD_NOW | RTLD_GLOBAL);
if (! handle)
throw MergerError("Unable to open libpaludistarextras due to error '" + stringify(::dlerror()) + "' from dlopen");