summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorFrédéric Brière <fbriere@fbriere.net>2018-02-12 19:22:53 -0500
committerFrédéric Brière <fbriere@fbriere.net>2019-12-29 02:39:51 -0500
commit4df6baa5ac4c9d96d5209b4f49390dc52a25f09d (patch)
treead63c58ba4fc126d0331b422776c016f4cca9f64 /src
parent05082ae12051821b1d969e6672d9e4e5afe1bc07 (diff)
downloadtwinkle-4df6baa5ac4c9d96d5209b4f49390dc52a25f09d.tar
twinkle-4df6baa5ac4c9d96d5209b4f49390dc52a25f09d.tar.gz
twinkle-4df6baa5ac4c9d96d5209b4f49390dc52a25f09d.tar.lz
twinkle-4df6baa5ac4c9d96d5209b4f49390dc52a25f09d.tar.xz
twinkle-4df6baa5ac4c9d96d5209b4f49390dc52a25f09d.zip
CMake: Check for strerror_r() (HAVE_STRERROR_R and STRERROR_R_CHAR_P)
This check (AC_FUNC_STRERROR_R) was originally present in configure.in, and was lost in the transition to CMake.
Diffstat (limited to 'src')
-rw-r--r--src/util.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 29aae39..60564a1 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -742,10 +742,10 @@ string to_printable(const string &s) {
}
string get_error_str(int errnum) {
-#if HAVE_STRERROR_R
+#ifdef HAVE_STRERROR_R
char buf[81];
memset(buf, 0, sizeof(buf));
-#if STRERROR_R_CHAR_P
+#ifdef STRERROR_R_CHAR_P
string errmsg(strerror_r(errnum, buf, sizeof(buf)-1));
#else
string errmsg;