--- stardict-3.0.7/dict/src/lib/sockets.cpp.orig +++ stardict-3.0.7/dict/src/lib/sockets.cpp @@ -45,6 +45,7 @@ # include <sys/types.h> # include <sys/socket.h> # include <netinet/in.h> +# include <arpa/inet.h> # include <netdb.h> # include <cerrno> # include <fcntl.h> @@ -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];