Package: squeezelite
Version: 1.8-3
Severity: Important
The upcoming lirc-0.9.4 has a compile-time conflict with syslog.h which
is included by the updated lirc.h header. The enclosed patch fixes this
by re-defining the conflicting symbols as needed.
Without the patch squeezelite won't build against the new lirc.
Please note that we would like to upload lirc 0.9.4 in unstable in the
next few weeks, in that timing this bug will become RC and an NMU might
be required.
Description: Handle LOG_ macros conflict with syslog.h
Upcoming lirc-0.9.4 includes syslog.h when including lirc_client.h. Since
ffmpeg uses macros like LOG_DEBUG which conflicts with the symbols in
syslog.h this leads to FTBS erros. Enclosed patch basically undefines
the syslog symbols before re-using them.
Author: Alec Leamas <lea...@nowhere.net>
--- squeezelite-1.8.orig/ir.c
+++ squeezelite-1.8/ir.c
@@ -20,12 +20,14 @@
// ir thread - linux only
+#if IR
+#include <lirc/lirc_client.h>
+#endif
+
#include "squeezelite.h"
#if IR
-#include <lirc/lirc_client.h>
-
#define LIRC_CLIENT_ID "squeezelite"
static log_level loglevel;
@@ -52,8 +54,10 @@ struct lirc {
};
static struct lirc *i;
+
#endif
+
#if LINKALL
#define LIRC(h, fn, ...) (lirc_ ## fn)(__VA_ARGS__)
#else
--- squeezelite-1.8.orig/squeezelite.h
+++ squeezelite-1.8/squeezelite.h
@@ -363,6 +363,26 @@ typedef enum { lERROR = 0, lWARN, lINFO,
const char *logtime(void);
void logprint(const char *fmt, ...);
+#ifdef LOG_ERROR
+#undef LOG_ERROR
+#endif
+
+#ifdef LOG_WARN
+#undef LOG_WARN
+#endif
+
+#ifdef LOG_INFO
+#undef LOG_INFO
+#endif
+
+#ifdef LOG_DEBUG
+#undef LOG_DEBUG
+#endif
+
+#ifdef LOG_SDEBUG
+#undef LOG_SDEBUG
+#endif
+
#define LOG_ERROR(fmt, ...) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define LOG_WARN(fmt, ...) if (loglevel >= lWARN) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)
#define LOG_INFO(fmt, ...) if (loglevel >= lINFO) logprint("%s %s:%d " fmt "\n", logtime(), __FUNCTION__, __LINE__, ##__VA_ARGS__)