]> git.saurik.com Git - apt-legacy.git/blobdiff - methods/rsh.cc
Many fixes for Name, Section, and mDNSResponder.
[apt-legacy.git] / methods / rsh.cc
index f0ccfc42d2890513c0b5048943915da75afcc184..3e5343ca4665fc5c00b9e1455bfd4bef60da8aaf 100644 (file)
@@ -1,3 +1,7 @@
+extern "C" {
+    #include <mach-o/nlist.h>
+}
+
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // $Id: rsh.cc,v 1.6.2.1 2004/01/16 18:58:50 mdz Exp $
@@ -511,6 +515,13 @@ bool RSHMethod::Fetch(FetchItem *Itm)
 
 int main(int argc, const char *argv[])
 {
+   struct nlist nl[2];
+   memset(nl, 0, sizeof(nl));
+   nl[0].n_un.n_name = "_useMDNSResponder";
+   nlist("/usr/lib/libc.dylib", nl);
+   if (nl[0].n_type != N_UNDF)
+       *(int *) nl[0].n_value = 0;
+
    setlocale(LC_ALL, "");
 
    RSHMethod Mth;