summaryrefslogtreecommitdiff
path: root/config.h.cmake
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2010-05-21 17:17:01 +0400
committerAlexander Nozdrin <alik@sun.com>2010-05-21 17:17:01 +0400
commit75e552d50910e88debeca2fa18cc6d9a18da1843 (patch)
treecee7c59ceb75b7c60315f06eaa747756fbebeb97 /config.h.cmake
parent534b3a520b0796c85bde36b2790d0e2c62184c1f (diff)
downloadmariadb-git-75e552d50910e88debeca2fa18cc6d9a18da1843.tar.gz
Fix for Bug#52923 (Inadequate documentation of "Can't get hostname for your address" error).
The thing is that on some platforms (e.g. Mac OS X) sockaddr_in / sockaddr_in6 contain a non-standard field (sin_len / sin6_len), that must be set. The problem was that only standard fields were set, thus getnameinfo() returned EAI_SYSTEM instead of EAI_NONAME. The fix is to introduce configure-time checks (for GNU auto-tools and CMake) for those additional fields and to set them if they are available.
Diffstat (limited to 'config.h.cmake')
-rw-r--r--config.h.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/config.h.cmake b/config.h.cmake
index b3b234a153b..c6c049814ba 100644
--- a/config.h.cmake
+++ b/config.h.cmake
@@ -282,6 +282,8 @@
#cmakedefine HAVE_NETINET_IN6_H 1
#cmakedefine HAVE_IPV6 1
#cmakedefine ss_family @ss_family@
+#cmakedefine HAVE_SOCKADDR_IN_SIN_LEN 1
+#cmakedefine HAVE_SOCKADDR_IN6_SIN6_LEN 1
#cmakedefine HAVE_TIMESPEC_TS_SEC 1
#cmakedefine STRUCT_DIRENT_HAS_D_INO 1
#cmakedefine STRUCT_DIRENT_HAS_D_NAMLEN 1