summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CMakeLists.txt2
-rw-r--r--config.h.cmake1
-rw-r--r--src/utils/encoding.cpp2
3 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f651723..b0d2801 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -80,3 +80,5 @@ target_link_libraries(test
irc
bridge
utils)
+
+CONFIGURE_FILE(config.h.cmake config.h @ONLY)
diff --git a/config.h.cmake b/config.h.cmake
new file mode 100644
index 0000000..5f0a3cb
--- /dev/null
+++ b/config.h.cmake
@@ -0,0 +1 @@
+#cmakedefine ICONV_SECOND_ARGUMENT_IS_CONST
diff --git a/src/utils/encoding.cpp b/src/utils/encoding.cpp
index 2a6aecb..2d95132 100644
--- a/src/utils/encoding.cpp
+++ b/src/utils/encoding.cpp
@@ -7,6 +7,8 @@
#include <string.h>
#include <iconv.h>
+#include "config.h"
+
/**
* The UTF-8-encoded character used as a place holder when a character conversion fails.
* This is U+FFFD � "replacement character"