diff --git a/lib/compat/cpp-start.h b/lib/compat/cpp-start.h index 4423ca8f36..c0c80864b1 100644 --- a/lib/compat/cpp-start.h +++ b/lib/compat/cpp-start.h @@ -91,6 +91,10 @@ #ifdef __cplusplus +#ifndef __STDC_VERSION__ +#define __STDC_VERSION__ 0 +#endif + #define this this_ extern "C" { diff --git a/modules/grpc/otel/filterx/object-otel-kvlist.cpp b/modules/grpc/otel/filterx/object-otel-kvlist.cpp index 8dccbf5d34..98ead65208 100644 --- a/modules/grpc/otel/filterx/object-otel-kvlist.cpp +++ b/modules/grpc/otel/filterx/object-otel-kvlist.cpp @@ -31,6 +31,9 @@ #include #include +/* The deprecated MutableRepeatedPtrField() does not have a proper alternative. */ +#pragma GCC diagnostic ignored "-Wdeprecated-declarations" + using namespace syslogng::grpc::otel::filterx; using opentelemetry::proto::common::v1::KeyValueList; using opentelemetry::proto::common::v1::AnyValue; diff --git a/modules/grpc/protos/CMakeLists.txt b/modules/grpc/protos/CMakeLists.txt index a4851d30cb..b234513942 100644 --- a/modules/grpc/protos/CMakeLists.txt +++ b/modules/grpc/protos/CMakeLists.txt @@ -91,5 +91,5 @@ target_include_directories(grpc-protos PRIVATE ${CMAKE_CURRENT_BINARY_DIR} ${PROJECT_SOURCE_DIR} ) -target_compile_options(grpc-protos PRIVATE -Wno-switch-default) +target_compile_options(grpc-protos PRIVATE -Wno-switch-default -Wno-deprecated-declarations) install(TARGETS grpc-protos LIBRARY DESTINATION lib/syslog-ng COMPONENT grpc-protos) diff --git a/modules/grpc/protos/Makefile.am b/modules/grpc/protos/Makefile.am index 06f1805093..28a14f5570 100644 --- a/modules/grpc/protos/Makefile.am +++ b/modules/grpc/protos/Makefile.am @@ -117,6 +117,7 @@ modules_grpc_protos_libgrpc_protos_la_CXXFLAGS = \ $(AM_CXXFLAGS) \ $(PROTOBUF_CFLAGS) \ $(GRPCPP_CFLAGS) \ + -Wno-deprecated-declarations \ -I$(GOOGLEAPIS_PROTO_SRCDIR) \ -I$(GOOGLEAPIS_PROTO_BUILDDIR) \ -I$(OPENTELEMETRY_PROTO_SRCDIR) \