Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
Please login to access the resource
DISCONTINUED:openSUSE:11.2
stardict
fix_gethostbynamer.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix_gethostbynamer.patch of Package stardict
Index: stardict-3.0.1/src/lib/sockets.cpp =================================================================== --- stardict-3.0.1.orig/src/lib/sockets.cpp 2007-09-12 17:11:41.000000000 +0800 +++ stardict-3.0.1/src/lib/sockets.cpp 2009-01-13 16:29:18.000000000 +0800 @@ -162,9 +162,12 @@ struct hostent hostinfo; char buf[1024]; int ret; - if (!gethostbyname_r(query_data->host.c_str(), &hostinfo, buf, - sizeof(buf), &phost, &ret)) { - query_data->sa = ((in_addr*)(hostinfo.h_addr))->s_addr; + + gethostbyname_r(query_data->host.c_str(), &hostinfo, buf, + sizeof(buf), &phost, &ret); + + if (ret == 0 && phost != NULL) { + query_data->sa = ((in_addr*)(hostinfo.h_addr))->s_addr; query_data->resolved = true; } else { query_data->resolved = false;
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor