termux-packages/x11-packages/i3/i3-4.15_libi3_get_exe_path....

25 lines
939 B
Diff
Raw Normal View History

2018-09-10 00:42:26 +02:00
diff -uNr i3-4.15/libi3/get_exe_path.c i3-4.15.mod/libi3/get_exe_path.c
--- i3-4.15/libi3/get_exe_path.c 2018-03-10 19:29:14.000000000 +0200
+++ i3-4.15.mod/libi3/get_exe_path.c 2018-06-21 22:17:26.293653511 +0300
@@ -73,12 +73,7 @@
/* Fall back to searching $PATH (or _CS_PATH in absence of $PATH). */
char *path = getenv("PATH");
if (path == NULL) {
- /* _CS_PATH is typically something like "/bin:/usr/bin" */
- while (confstr(_CS_PATH, tmp, tmp_size) > tmp_size) {
- tmp_size = tmp_size * 2;
- tmp = srealloc(tmp, tmp_size);
- }
- sasprintf(&path, ":%s", tmp);
+ path = sstrdup("@TERMUX_PREFIX@/bin:@TERMUX_PREFIX@/bin/applets");
} else {
path = sstrdup(path);
}
@@ -103,5 +98,5 @@
free(tmp);
/* Last resort: maybe its in /usr/bin? */
- return sstrdup("/usr/bin/i3-nagbar");
+ return sstrdup("@TERMUX_PREFIX@/bin/i3-nagbar");
}