summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ConfigureChecks.cmake2
-rw-r--r--config.h.cmake8
2 files changed, 10 insertions, 0 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 7fe40e2ce..2382d6dca 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -16,6 +16,8 @@ test_big_endian(WORDS_BIGENDIAN)
tde_setup_largefiles( )
+check_symbol_exists( strlcpy "string.h" HAVE_STRLCPY_PROTO )
+check_symbol_exists( strlcat "string.h" HAVE_STRLCAT_PROTO )
##### check for gcc visibility support #########
diff --git a/config.h.cmake b/config.h.cmake
index eb51aa524..6a53137bf 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -49,6 +49,11 @@
#cmakedefine HAVE_LIBXSS 1
// mimelib
+#cmakedefine HAVE_STRLCPY_PROTO
+
+#cmakedefine HAVE_STRLCAT_PROTO
+
+#if !defined(HAVE_STRLCPY_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
@@ -56,7 +61,9 @@ unsigned long strlcpy(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
+#endif
+#if !defined(HAVE_STRLCAT_PROTO)
#ifdef __cplusplus
extern "C" {
#endif
@@ -64,3 +71,4 @@ unsigned long strlcat(char*, const char*, unsigned long);
#ifdef __cplusplus
}
#endif
+#endif