--- stardict-3.0.3/dict/src/lib/sockets.cpp.~1~ 2011-07-03 10:58:40.000000000 +0400 +++ stardict-3.0.3/dict/src/lib/sockets.cpp 2014-12-02 17:48:18.842815185 +0300 @@ -45,6 +45,7 @@ # include # include # include +# include # include # include # include @@ -177,7 +178,7 @@ { DnsQueryData *query_data = (DnsQueryData *)data; struct hostent *phost; -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__sun__) #ifdef HAVE_GETHOSTBYNAME_R struct hostent hostinfo; char buf[1024];