]> git.ipfire.org Git - thirdparty/collectd.git/commitdiff
write_open_telemetry plugin: Wrap headers with `extern "C"`.
authorFlorian Forster <octo@collectd.org>
Sat, 2 Dec 2023 21:41:28 +0000 (22:41 +0100)
committerFlorian Forster <octo@collectd.org>
Wed, 3 Jan 2024 16:16:28 +0000 (17:16 +0100)
This is required for linking correctly.

src/write_open_telemetry.cc

index c45f82d9446cb97d4ab70238db013b9084dc5525..f26f37af1c8e7e91af8621016e2843cd8a5588cb 100644 (file)
@@ -35,6 +35,7 @@
  * </Plugin>
  */
 
+extern "C" {
 #include "collectd.h"
 
 #include "plugin.h"
@@ -46,6 +47,7 @@
 #include "utils_complain.h"
 
 #include <netdb.h>
+}
 
 #ifndef OT_DEFAULT_HOST
 #define OT_DEFAULT_HOST "localhost"