mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 09:51:29 +00:00
Unset LD_LIBRARY_PATH, unless specified
This commit is contained in:
parent
81102e8eac
commit
138bcd0cfa
|
@ -47,9 +47,11 @@ option(enable-swaymsg "Enables the swaymsg utility" YES)
|
||||||
option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES)
|
option(enable-gdk-pixbuf "Use Pixbuf to support more image formats" YES)
|
||||||
option(zsh-completions "Zsh shell completions" NO)
|
option(zsh-completions "Zsh shell completions" NO)
|
||||||
option(default-wallpaper "Installs the default wallpaper" YES)
|
option(default-wallpaper "Installs the default wallpaper" YES)
|
||||||
set(LD_LIBRARY_PATH "/usr/lib" CACHE STRING "Configures sway's default LD_LIBRARY_PATH")
|
option(LD_LIBRARY_PATH "Configure sway's default LD_LIBRARY_PATH")
|
||||||
|
|
||||||
add_definitions(-D_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}")
|
if (LD_LIBRARY_PATH)
|
||||||
|
add_definitions(-D_LD_LIBRARY_PATH="${LD_LIBRARY_PATH}")
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(JsonC REQUIRED)
|
find_package(JsonC REQUIRED)
|
||||||
find_package(PCRE REQUIRED)
|
find_package(PCRE REQUIRED)
|
||||||
|
|
|
@ -214,7 +214,11 @@ int main(int argc, char **argv) {
|
||||||
|
|
||||||
// Security:
|
// Security:
|
||||||
unsetenv("LD_PRELOAD");
|
unsetenv("LD_PRELOAD");
|
||||||
|
#ifdef _LD_LIBRARY_PATH
|
||||||
setenv("LD_LIBRARY_PATH", _LD_LIBRARY_PATH, 1);
|
setenv("LD_LIBRARY_PATH", _LD_LIBRARY_PATH, 1);
|
||||||
|
#else
|
||||||
|
unsetenv("LD_LIBRARY_PATH");
|
||||||
|
#endif
|
||||||
|
|
||||||
int c;
|
int c;
|
||||||
while (1) {
|
while (1) {
|
||||||
|
|
Loading…
Reference in a new issue