summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-22 18:21:53 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-22 18:21:53 +0200
commitef141bb147fde7915c17b336cfbc3e7ef6e72ce3 (patch)
treed1a4a8f4c06797218484d78789213c7d277684ef /sdext
parentf61cdf6fa8c3ceb5435fadbe469fa55883c8b31f (diff)
Do not drop existing LD_LIBRARY_PATH
Change-Id: I5b3599596dc40d1f88c075257c466b56ed73e795
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/wrapper/wrapper.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/sdext/source/pdfimport/wrapper/wrapper.cxx b/sdext/source/pdfimport/wrapper/wrapper.cxx
index d02407192576..ddba8b348497 100644
--- a/sdext/source/pdfimport/wrapper/wrapper.cxx
+++ b/sdext/source/pdfimport/wrapper/wrapper.cxx
@@ -59,8 +59,8 @@
#include <boost/scoped_ptr.hpp>
#include <boost/unordered_map.hpp>
#include <string.h>
-#ifdef WNT
#include <stdlib.h>
+#ifdef WNT
#include <ctype.h>
#endif
@@ -1042,6 +1042,13 @@ bool xpdf_ImportFromFile( const OUString& rURL,
OUStringBuffer aEnvBuf( aStr.getLength() + 20 );
aEnvBuf.appendAscii( "LD_LIBRARY_PATH=" );
aEnvBuf.append( aSysPath );
+ char const * path = getenv("LD_LIBRARY_PATH");
+ if (path != 0 && path[0] != 0)
+ {
+ aEnvBuf.append(':');
+ aEnvBuf.append(
+ OUString(path, strlen(path), RTL_TEXTENCODING_ISO_8859_1));
+ }
aStr = aEnvBuf.makeStringAndClear();
ppEnv = &aStr.pData;
nEnv = 1;