[LEDE-DEV] [PATCH] procd: fix build when DEBUG is set
Felix Fietkau
nbd at nbd.name
Thu Oct 13 08:03:09 PDT 2016
On 2016-10-13 16:39, Zefir Kurtisi wrote:
> There is a collision between the DEBUG set in the CMake file as
> flag and the macro defined in log.h, resulting in build error:
>
> In file included from ./procd/initd/init.h:19:0,
> from ./procd/initd/init.c:33:
> ./procd/initd/../log.h:20:0: error: "DEBUG" redefined [-Werror]
> #define DEBUG(level, fmt, ...) do { \
> ^
> <command-line>:0:0: note: this is the location of the previous definition
> cc1: all warnings being treated as errors
>
> This patch fixes the issue by undefining the initial boolean
> flag before it is set to the debug log macro.
>
> Signed-off-by: Zefir Kurtisi <zefir.kurtisi at neratec.com>
I think the #undef is a bit ugly. Please change the define in
CMakeLists.txt and the places that use it.
- Felix
More information about the Lede-dev
mailing list