From bc80b4f190375d6865f6a2d0843c432c5a108d7c Mon Sep 17 00:00:00 2001 From: anthraxx Date: Thu, 11 Apr 2019 00:29:00 +0200 Subject: [PATCH] prepend system library path in case of running in native mode This gives precedence to system libraries but otherwise keeps the intended search order intact. SYSTEM_LD_LIBRARY_PATH is exported in steam.sh for the purpose of using the original library path whenever needed. --- steamwebhelper.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/steamwebhelper.sh b/steamwebhelper.sh index f002eee..0658c6e 100755 --- a/steamwebhelper.sh +++ b/steamwebhelper.sh @@ -2,4 +2,8 @@ DIR=`dirname $0` cd ${DIR} export LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH}:${DIR}" +# Give precedence to system libraries when running in native mode +if [[ "${STEAM_RUNTIME}" = "0" && -n "${SYSTEM_LD_LIBRARY_PATH}" ]]; then + export LD_LIBRARY_PATH="${SYSTEM_LD_LIBRARY_PATH:-}:${LD_LIBRARY_PATH}" +fi ./steamwebhelper "$@" -- 2.21.0