From 1bba689c80e676a138d9ea397f669e3f70b3f163 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 c27cf4339..c0527d823 100644 --- a/connectors/cdc-connector/cdc_connector.cpp +++ b/connectors/cdc-connector/cdc_connector.cpp @@ -170,6 +170,8 @@ 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 321aba00d..0490d089f 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). -const char* TIMEOUT = "Request timed out"; +extern const char* const TIMEOUT; // The typedef for the Row type class Row;