summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLuboš Doležel <lubos@dolezel.info>2020-02-23 09:45:51 +0100
committerGitHub <noreply@github.com>2020-02-23 09:45:51 +0100
commit7ac04131e795fd425a6afa3e5c4f0daf53d2fec8 (patch)
tree3ab5a5ca4190cda03d119a2bf9a15800d64363d8 /src
parenta25b22bd43997726a911c69d1d82e08250a3a8b4 (diff)
parent6952b81fe89a136c0d087aa98cfbfd8bfc965818 (diff)
downloadtwinkle-7ac04131e795fd425a6afa3e5c4f0daf53d2fec8.tar
twinkle-7ac04131e795fd425a6afa3e5c4f0daf53d2fec8.tar.gz
twinkle-7ac04131e795fd425a6afa3e5c4f0daf53d2fec8.tar.lz
twinkle-7ac04131e795fd425a6afa3e5c4f0daf53d2fec8.tar.xz
twinkle-7ac04131e795fd425a6afa3e5c4f0daf53d2fec8.zip
Merge pull request #116 from fbriere/misc/old-autotools-stuff
Add missing tests lost in the autotools to CMake transition
Diffstat (limited to 'src')
-rw-r--r--src/sockets/dnssrv.cpp1
-rw-r--r--src/util.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/sockets/dnssrv.cpp b/src/sockets/dnssrv.cpp
index 38cd61d..246bf02 100644
--- a/src/sockets/dnssrv.cpp
+++ b/src/sockets/dnssrv.cpp
@@ -11,6 +11,7 @@
#include <sys/time.h>
#include <netinet/in.h>
#include <arpa/nameser.h>
+#include "twinkle_config.h"
#include <resolv.h>
#include <errno.h>
#include <stdlib.h>
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;