From: Leo Ruan <tingquan.ruan@xxxxxxxxxxxx> If you have an application stderr shall not be used by libsocketcan you can disable all error logging by defining DISABLE_ERROR_LOG. Signed-off-by: Leo Ruan <tingquan.ruan@xxxxxxxxxxxx> Signed-off-by: Mark Jonas <mark.jonas@xxxxxxxxxxxx> --- src/libsocketcan.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/libsocketcan.c b/src/libsocketcan.c index c4b95d9..60500cd 100644 --- a/src/libsocketcan.c +++ b/src/libsocketcan.c @@ -36,6 +36,12 @@ #include <libsocketcan.h> +/* Define DISABLE_ERROR_LOG to disable printing of error messages to stderr. */ +#ifdef DISABLE_ERROR_LOG +#define perror(x) +#define fprintf(...) +#endif + #define parse_rtattr_nested(tb, max, rta) \ (parse_rtattr((tb), (max), RTA_DATA(rta), RTA_PAYLOAD(rta))) -- 2.7.4 -- To unsubscribe from this list: send the line "unsubscribe linux-can" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html