From c0ebf663e3611374f5425634d4d0ce6ebd40830a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Thu, 22 Nov 2018 14:42:26 +0200 Subject: [PATCH] Make the error message a const char* const This prevents linker errors if the source files are used directly. --- connectors/cdc-connector/cdc_connector.cpp | 2 ++ connectors/cdc-connector/cdc_connector.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/connectors/cdc-connector/cdc_connector.cpp b/connectors/cdc-connector/cdc_connector.cpp index 6391aa3ae..a4b57abe6 100644 --- a/connectors/cdc-connector/cdc_connector.cpp +++ b/connectors/cdc-connector/cdc_connector.cpp @@ -169,6 +169,8 @@ template <> void Closer::close(int fd) namespace CDC { +const char* const TIMEOUT = "Request timed out"; + /** * Public functions */ diff --git a/connectors/cdc-connector/cdc_connector.h b/connectors/cdc-connector/cdc_connector.h index b44408d4a..48510853e 100644 --- a/connectors/cdc-connector/cdc_connector.h +++ b/connectors/cdc-connector/cdc_connector.h @@ -32,7 +32,7 @@ namespace CDC // The error strings returned by the getError library. These can be used to // check for the most common errors (which right now is only the timeout). -static const char* TIMEOUT = "Request timed out"; +extern const char* const TIMEOUT; // The typedef for the Row type class Row;