termux-packages/packages/mpc/src-options.c.patch

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 */