Subject: Re: pkg/29836
To: None <jmmv@netbsd.org, gnats-admin@netbsd.org, pkgsrc-bugs@netbsd.org>
From: Jared D. McNeill <jmcneill@invisible.ca>
List: pkgsrc-bugs
Date: 03/30/2005 19:59:01
The following reply was made to PR pkg/29836; it has been noted by GNATS.

From: "Jared D. McNeill" <jmcneill@invisible.ca>
To: "Julio M. Merino Vidal" <jmmv84@gmail.com>
Cc: gnats-bugs@netbsd.org, wiz@netbsd.org, jmcneill@NetBSD.org
Subject: Re: pkg/29836
Date: Wed, 30 Mar 2005 15:58:27 -0400 (AST)

 The following patches makes things a bit better (doesn't crash when I 
 browse the network), but as soon as I choose 'Windows network' it says
 'Couldn't browse smb:///'. They should be applied anyway, but this PR 
 isn't completely fixed yet.
 
 Cheers,
 Jared
 
 --- gnome-vfs-2.10.0/libgnomevfs/gnome-vfs-resolve.c.orig       2005-03-30 
 15:35:34.000000000 -0400
 +++ gnome-vfs-2.10.0/libgnomevfs/gnome-vfs-resolve.c    2005-03-30 
 15:38:19.000000000 -0400
 @@ -45,6 +45,7 @@
   #include <resolv.h>
   /* RELOAD_TIMEVAL specifies the minimum of seconds between resolver 
 reloads */
   #define RELOAD_TIMEVAL 2
 +struct __res_state myres;
   #endif
 
   #include <glib/gmem.h>
 @@ -149,7 +150,7 @@
             if ((now.tv_sec - last_reload.tv_sec) > RELOAD_TIMEVAL) {
 
                           last_reload.tv_sec = now.tv_sec;
 -                        ret = (res_ninit (&_res) == 0);
 +                        ret = (res_ninit (&myres) == 0);
             } else {
 
                           ret = FALSE;
 
 
 --- gnome-vfs-2.10.0/libgnomevfs/gnome-vfs-dns-sd.c.orig        2005-03-30 
 15:49:59.000000000 -0400
 +++ gnome-vfs-2.10.0/libgnomevfs/gnome-vfs-dns-sd.c     2005-03-30 
 15:51:08.000000000 -0400
 @@ -36,6 +36,8 @@
   #include <gconf/gconf-client.h>
   #include <unistd.h>
 
 +struct __res_state myres;
 +
   #ifdef HAVE_HOWL
   /* Need to work around howl exporting its config file... */
   #undef PACKAGE
 @@ -338,7 +340,7 @@
          }
 
          /* Use TCP to support large queries */
 -       _res.options |= RES_USEVC;
 +       myres.options |= RES_USEVC;
          searchdomain = g_strconcat ("_browse._dns-sd._udp.", domain, 
 NULL);
          reply_len = res_search (searchdomain, ns_c_in, ns_t_ptr,
                                  reply, sizeof (reply));
 @@ -450,7 +452,7 @@
          }
 
          /* Use TCP to support large queries */
 -       _res.options |= RES_USEVC;
 +       myres.options |= RES_USEVC;
          searchdomain = g_strconcat (type, ".", domain, NULL);
          reply_len = res_search (searchdomain, ns_c_in, ns_t_ptr,
                                  reply, sizeof (reply));
 @@ -613,7 +615,7 @@
          }
 
          /* Use TCP to support large queries */
 -       _res.options |= RES_USEVC;
 +       myres.options |= RES_USEVC;
 
          full_name = service_to_dns_name (name, type, domain);
          reply_len = res_search (full_name, ns_c_in, ns_t_any,