From: Max Kellermann Date: Fri, 7 Nov 2008 07:16:46 +0000 (+0100) Subject: lirc: pass writable string to lirc_init() X-Git-Tag: v0.12_alpha1~41 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=1203f4f8e6f18ef3a4cd1dcb0287ca1a889b3d4b;p=ncmpc.git lirc: pass writable string to lirc_init() The "prog" argument of lirc_init() expects a non-const string. Pass a local string variable. --- diff --git a/src/lirc.c b/src/lirc.c index 0ad34ca..4e7e423 100644 --- a/src/lirc.c +++ b/src/lirc.c @@ -6,7 +6,9 @@ static int lirc_socket = 0; int ncmpc_lirc_open() { - if ((lirc_socket = lirc_init("ncmpc", 0)) == -1) + char prog[] = "ncmpc"; + + if ((lirc_socket = lirc_init(prog, 0)) == -1) return -1; if (lirc_readconfig(NULL, &lc, NULL)) {