summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/qpidd.cpp
diff options
context:
space:
mode:
authorTed Ross <tross@apache.org>2008-06-05 14:04:56 +0000
committerTed Ross <tross@apache.org>2008-06-05 14:04:56 +0000
commite9f3677cce7a83f838fba34dcafa17e8fa6e217b (patch)
treeab48646807ae1e0a3ba3083fbad920ad079b9bc2 /qpid/cpp/src/qpidd.cpp
parentd659e312c1e0ee24ab6283d0d0e601aeb247efc3 (diff)
downloadqpid-python-e9f3677cce7a83f838fba34dcafa17e8fa6e217b.tar.gz
Load modules from /usr/lib64/qpidd on x86_64 architecture
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@663614 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/qpidd.cpp')
-rw-r--r--qpid/cpp/src/qpidd.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/qpid/cpp/src/qpidd.cpp b/qpid/cpp/src/qpidd.cpp
index ad3dcb3aeb..23781ead2c 100644
--- a/qpid/cpp/src/qpidd.cpp
+++ b/qpid/cpp/src/qpidd.cpp
@@ -33,6 +33,7 @@
#include <fstream>
#include <signal.h>
#include <unistd.h>
+#include <sys/utsname.h>
using namespace qpid;
using namespace qpid::broker;
@@ -47,6 +48,12 @@ struct ModuleOptions : public qpid::Options {
bool noLoad;
ModuleOptions() : qpid::Options("Module options"), loadDir("/usr/lib/qpidd"), noLoad(false)
{
+ struct utsname _uname;
+ if (::uname(&_uname) == 0) {
+ if (string(_uname.machine) == "x86_64")
+ loadDir = "/usr/lib64/qpidd";
+ }
+
addOptions()
("module-dir", optValue(loadDir, "DIR"), "Load all .so modules in this directory")
("load-module", optValue(load, "FILE"), "Specifies additional module(s) to be loaded")