diff --git a/configure.ac b/configure.ac index bc2f1c50..ee8f8562 100644 --- a/configure.ac +++ b/configure.ac @@ -90,6 +90,8 @@ dnl ###################################################################### AC_PROG_GREP AC_PROG_EGREP +: ${CFLAGS=""} +: ${CPPFLAGS=""} AC_PROG_CC AC_PROG_MKDIR_P AC_EXEEXT @@ -1283,8 +1285,8 @@ dnl ###################################################################### dnl Collect all the options dnl ###################################################################### -CORE_CPPFLAGS="$PCRE2_CPPFLAGS $OPENSSL_CPPFLAGS $LIBYAML_CPPFLAGS $CPPFLAGS" -CORE_CFLAGS="$PCRE2_CFLAGS $OPENSSL_CFLAGS $LIBYAML_CFLAGS $CFLAGS" +CORE_CPPFLAGS="$PCRE2_CPPFLAGS $OPENSSL_CPPFLAGS $LIBYAML_CPPFLAGS" +CORE_CFLAGS="$PCRE2_CFLAGS $OPENSSL_CFLAGS $LIBYAML_CFLAGS" CORE_LDFLAGS="$PCRE2_LDFLAGS $OPENSSL_LDFLAGS $LIBYAML_LDFLAGS $LDFLAGS" CORE_LIBS="$PCRE2_LIBS $OPENSSL_LIBS $LIBYAML_LIBS $LIBS" diff --git a/libutils/buffer.c b/libutils/buffer.c index 861bf1cd..44a4e993 100644 --- a/libutils/buffer.c +++ b/libutils/buffer.c @@ -721,7 +721,7 @@ const char* BufferSearchAndReplace(Buffer *buffer, const char *pattern, ret = pcre2_substitute(regex, (PCRE2_SPTR) BufferData(buffer), BufferSize(buffer), 0, subst_opts, match_data, NULL, (PCRE2_SPTR) substitute, PCRE2_ZERO_TERMINATED, - result, &out_size); + (PCRE2_UCHAR8 *) result, &out_size); if (ret == PCRE2_ERROR_NOMEMORY) { result = xrealloc(result, out_size); diff --git a/libutils/json-yaml.c b/libutils/json-yaml.c index 24dcd01e..7fc85914 100644 --- a/libutils/json-yaml.c +++ b/libutils/json-yaml.c @@ -161,7 +161,7 @@ static void JsonParseYamlData(yaml_parser_t *parser, JsonElement *element, const if (key == NULL) { // save key - key = xstrdup(event.data.scalar.value); + key = xstrdup((const char *)event.data.scalar.value); } else { @@ -343,7 +343,7 @@ JsonParseError JsonParseYamlString(const char **data, JsonElement **json_out) return JSON_PARSE_ERROR_LIBYAML_FAILURE; } - yaml_parser_set_input_string(&parser, *data, strlen(*data)); + yaml_parser_set_input_string(&parser, (const unsigned char *) *data, strlen(*data)); JsonElement *holder = JsonArrayCreate(1); JsonParseYamlData(&parser, holder, 0);