35 lines
1.4 KiB
Diff
35 lines
1.4 KiB
Diff
|
--- a/src/mpd_client/mpd_client_autoconf.c
|
||
|
+++ b/src/mpd_client/mpd_client_autoconf.c
|
||
|
@@ -102,12 +102,12 @@
|
||
|
}
|
||
|
|
||
|
//check for socket
|
||
|
- if (access("/run/mpd/socket", F_OK ) == 0) { /* Flawfinder: ignore */
|
||
|
- mympd_state->mpd_state->mpd_host = sds_replace(mympd_state->mpd_state->mpd_host, "/run/mpd/socket");
|
||
|
+ if (access("@TERMUX_PREFIX@/var/run/mpd/socket", F_OK ) == 0) { /* Flawfinder: ignore */
|
||
|
+ mympd_state->mpd_state->mpd_host = sds_replace(mympd_state->mpd_state->mpd_host, "@TERMUX_PREFIX@/var/run/mpd/socket");
|
||
|
return;
|
||
|
}
|
||
|
- if (access("/var/run/mpd/socket", F_OK ) == 0) { /* Flawfinder: ignore */
|
||
|
- mympd_state->mpd_state->mpd_host = sds_replace(mympd_state->mpd_state->mpd_host, "/var/run/mpd/socket");
|
||
|
+ if (access("@TERMUX_PREFIX@/run/mpd/socket", F_OK ) == 0) { /* Flawfinder: ignore */
|
||
|
+ mympd_state->mpd_state->mpd_host = sds_replace(mympd_state->mpd_state->mpd_host, "@TERMUX_PREFIX@/run/mpd/socket");
|
||
|
return;
|
||
|
}
|
||
|
}
|
||
|
@@ -116,10 +116,10 @@
|
||
|
|
||
|
static sds _find_mpd_conf(void) {
|
||
|
const char *filenames[] = {
|
||
|
- "/etc/mpd.conf",
|
||
|
- "/usr/local/etc/mpd.conf",
|
||
|
- "/etc/opt/mpd/mpd.conf",
|
||
|
- "/etc/opt/mpd.conf",
|
||
|
+ "@TERMUX_PREFIX@/etc/mpd.conf",
|
||
|
+ "@TERMUX_PREFIX@/local/etc/mpd.conf",
|
||
|
+ "@TERMUX_PREFIX@/etc/opt/mpd/mpd.conf",
|
||
|
+ "@TERMUX_PREFIX@/etc/opt/mpd.conf",
|
||
|
NULL
|
||
|
};
|
||
|
|