Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 101257 | Differences between
and this patch

Collapse All | Expand All

(-)amap-5.1.orig/amap-lib.c (-2 / +9 lines)
Lines 164-173 Link Here
164
//  if ((xx=inet_aton(host, &in)) <= 0) {
164
//  if ((xx=inet_aton(host, &in)) <= 0) {
165
//printf("failed %d: %d %s\n",xx,AF_INET,host);
165
//printf("failed %d: %d %s\n",xx,AF_INET,host);
166
//#endif
166
//#endif
167
    if ((target = gethostbyname(host)) != NULL) {
167
#ifdef AF_INET6
168
  if (inet_pton(AF_INET, host, &in) < 0) {
169
#else
170
  if (inet_aton(host, &in) <= 0) {
171
#endif
172
    if ((target = gethostbyname(host)) != NULL)
168
      memcpy((char*)&ip, (char*)target->h_addr, 4);
173
      memcpy((char*)&ip, (char*)target->h_addr, 4);
169
    } else
174
    else
170
      amap_error("could not resolve host: %s", host);
175
      amap_error("could not resolve host: %s", host);
176
  } else
177
    memcpy((char*)&ip, (char*)&in.s_addr, 4);
171
//  } else
178
//  } else
172
//{
179
//{
173
//    memcpy((char*)&ip, (char*)&in.s_addr, 4);
180
//    memcpy((char*)&ip, (char*)&in.s_addr, 4);

Return to bug 101257