mirror of
https://github.com/obgm/libcoap.git
synced 2026-11-01 07:25:47 +03:00
The syslog LOG_ definitions are defined in <syslog.h> and can be defined in coap_debug.h (wrapped by a HAVE_SYSLOG_H wrapper to prevent duplicaton). However, the coding order of include <coap3/coap.h> include <stdio.h works, but include <stdio.h include <coap3/coap.h> but fails if the application build environment does not define HAVE_SYSLOG_H (as is the case of the examples in the examples/ directory). The former "just" happens to work as the values of the variables are the same. This fix is to remove the coap_log_t enum and replace it by simple #define if LOG_ALERT etc. is not already defined. Make coap_log_t int to remove Visual Studio compile warnings.