id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,irc_client,os,os_version 1098,patch: srv_lookup on cygwin,jcopenha@…,,"The {{{srv_lookup}}} routine in {{{lib/misc.c}}} always returns zero responses on Cygwin. It is configured to do this because the {{{ns_initparse}}} and {{{ns_parserr}}} routines are not provided on Cygwin. Because {{{srv_lookup}}} always returns zero results Jabber accounts where the server does not match the {{{@server.com}}} portion of the username have to explicitly set a server name. This means that you can not do {{{tls_verify}}} on those accounts. For instance, {{{username@gmail.com}}} with a {{{srv_lookup}}} fail must set server name to {{{talk.google.com}}}. But Google returns a certificate for gmaill.com which the verify code thinks is the wrong server because it does not match the server name. This patch does 3 things. 1. It changes the configure script to check for {{{res_qeruy}}} and {{{dn_expandname}}} when looking for {{{libresolv}}}. It also has a new check for {{{ns_initparse}}} and {{{ns_initparserr}}} to see if {{{libresolv}}} or {{{libc}}} provides them. 2. It changes the {{{lib/misc.c}}} {{{srv_lookup}}} routine to use {{{dn_expandname}}} instead of the custom code. This allows {{{srv_lookup}}} to process compressed names correctly. Cygwin {{{res_query}}} returns a compressed name and since bitlbee already requires {{{libresolv}}} this seems like the more correct solution. 3. It adds {{{lib/ns_parse.c}}} to provide {{{ns_initparse}}} and {{{ns_parserr}}} on platforms where those were not detected at {{{./configure}}} time. This is a copy of a file from {{{libbind-6.0}}} source with the copyright still in place and just minor modification. Removal of two functions that bitlbee does not use and added some {{{#ifdefd}}}s and {{{#include “bittlbee.h”}}}. Reading the copyright/license notice I believe this is acceptable. The end goal of this patch is to allow me to set up a Jabber account with {{{username@gmail.com}}} and {{{tls_verify}}} to {{{true}}}. I know bitlbee doesn’t officially support Cygwin which is why I’m providing a patch instead of just reporting a bug. If the addition of {{{ns_parse.c}}} is more than bitlbee wants to take on I think the first two parts of the patch are still valuable and will help me in maintaining my own patch. ",defect,closed,major,,BitlBee,3.2,fixed,patch,leva@…,Client-independent,Public server,