mirror of
https://github.com/termux/termux-packages
synced 2024-06-19 05:57:07 +00:00
Previously mpc had to be run with '--host $PREFIX/var/run/mpd.socket', or else we got: MPD error: Connection refused Patch mpd to use our socket if --host option is omitted, so that it works without extra options.
16 lines
645 B
Diff
16 lines
645 B
Diff
--- ../options.c.orig 2022-07-28 21:21:13.150375029 +0200
|
|
+++ ./src/options.c 2022-07-28 21:25:59.500403799 +0200
|
|
@@ -304,7 +304,11 @@
|
|
option_error(ERROR_MISSING_ARGUMENT, opt->longopt, opt->argument);
|
|
|
|
/* Parse the password from the host */
|
|
- if (options.host != NULL &&
|
|
+ if (options.host == NULL) {
|
|
+ /* Use socket in @TERMUX_$PREFIX@/var/run/mpd.socket
|
|
+ if none was specified */
|
|
+ options.host = "@TERMUX_PREFIX@/var/run/mpd.socket";
|
|
+ } else if (options.host != NULL &&
|
|
(tmp = strchr(options.host, '@')) != NULL &&
|
|
/* if the host begins with a '@' then it's not an empty
|
|
password but an abstract socket */
|