diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sockets/dnssrv.cpp | 1 | ||||
-rw-r--r-- | src/util.cpp | 4 |
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; |