Follow-up Comment #4, bug #16623 (project freeciv):

I made a patch that replaces gethostbyname2() with getaddrinfo().

However, I run OpenBSD, so I cannot determine if this patch fixes this bug
with Microsoft Windows. (I have a different reason to use getaddrinfo(): it
helps fe80::/64 link-local addresses.)

Can the original poster, or anyone with similar Windows system, try this
patch?

----

Freeciv uses net_lookup_service() of netintf.c to get socket addresses. With
this patch, net_lookup_service() uses getaddrinfo() for IPv6 addresses, and
uses inet_aton() or gethostbyname() for IPv4 addresses.

My idea from comment #3, about replacing 'the multiple calls to
net_lookup_service() with a single call to getaddrinfo()', would require much
more refactoring of Freeciv code.

(file #10345, file #10346)
    _______________________________________________________

Additional Item Attachment:

File name: p22-getaddrinfo.diff           Size:3 KB
File name: ptrunk-getaddrinfo.diff        Size:3 KB


    _______________________________________________________

Reply to this item at:

  <http://gna.org/bugs/?16623>

_______________________________________________
  Message sent via/by Gna!
  http://gna.org/


_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to