From 1203f4f8e6f18ef3a4cd1dcb0287ca1a889b3d4b Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 7 Nov 2008 08:16:46 +0100 Subject: [PATCH] lirc: pass writable string to lirc_init() The "prog" argument of lirc_init() expects a non-const string. Pass a local string variable. --- src/lirc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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)) { -- 2.30.2