aboutsummaryrefslogtreecommitdiff
path: root/sway/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'sway/main.c')
-rw-r--r--sway/main.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sway/main.c b/sway/main.c
index 7bf71b53..1c4c56c0 100644
--- a/sway/main.c
+++ b/sway/main.c
@@ -214,7 +214,11 @@ int main(int argc, char **argv) {
// Security:
unsetenv("LD_PRELOAD");
+#ifdef _LD_LIBRARY_PATH
setenv("LD_LIBRARY_PATH", _LD_LIBRARY_PATH, 1);
+#else
+ unsetenv("LD_LIBRARY_PATH");
+#endif
int c;
while (1) {