Commit 5b2eb4f0 authored by Deomid Ryabkov's avatar Deomid Ryabkov Committed by Cesanta Bot

Enable building with CS_ENABLE_STDIO=0

h/t @kzyapkov

PUBLISHED_FROM=d15a5a0057f69f2f755af6436e676b1b179d069d
parent 10c274c7
......@@ -582,6 +582,8 @@ enum cs_log_level cs_log_threshold WEAK =
static char *s_filter_pattern = NULL;
static size_t s_filter_pattern_len;
void cs_log_set_filter(const char *pattern) WEAK;
#if CS_ENABLE_STDIO
FILE *cs_log_file WEAK = NULL;
......@@ -592,7 +594,6 @@ double cs_log_ts WEAK;
enum cs_log_level cs_log_cur_msg_level WEAK = LL_NONE;
void cs_log_set_filter(const char *pattern) WEAK;
void cs_log_set_filter(const char *pattern) {
free(s_filter_pattern);
if (pattern != NULL) {
......@@ -647,6 +648,12 @@ void cs_log_set_file(FILE *file) {
cs_log_file = file;
}
#else
void cs_log_set_filter(const char *pattern) {
(void) pattern;
}
#endif /* CS_ENABLE_STDIO */
void cs_log_set_level(enum cs_log_level level) WEAK;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment