From cd0e608be34bcfce8a5ce0e9a7fb1adac966a36f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 16 Feb 2015 01:06:24 +0000 Subject: [PATCH] Increase the buffer size used for the host names in wxIPaddress. This avoids failing to set the host name if the system /etc/hosts file has any host names that wouldn't fit in our buffer: at least under Linux/glibc, gethostname_r() returns error if any such names exist even if we don't ask for them. Closes #16641. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@78506 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/sckaddr.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/sckaddr.cpp b/src/common/sckaddr.cpp index e2649b3221..062ef04147 100644 --- a/src/common/sckaddr.cpp +++ b/src/common/sckaddr.cpp @@ -142,7 +142,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) } }; #else - typedef char wxGethostBuf[1024]; + typedef char wxGethostBuf[4096]; #endif #ifdef HAVE_FUNC_GETSERVBYNAME_R_4 @@ -154,7 +154,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxUNIXaddress, wxSockAddress) } }; #else - typedef char wxGetservBuf[1024]; + typedef char wxGetservBuf[4096]; #endif #if defined(wxHAS_MT_SAFE_GETBY_FUNCS) || !wxUSE_THREADS