]> git.saurik.com Git - apt-legacy.git/blobdiff - cmdline/apt-cache.cc
Drastic, sweeping modifications to support iPhone 1.2.0/2.0.
[apt-legacy.git] / cmdline / apt-cache.cc
index b05d6b98d982e96e2319d6f123fa307a03d49886..37594e7a69b6890bea57a20ebf698a69a84074bf 100644 (file)
@@ -1,3 +1,7 @@
+extern "C" {
+    #include <mach-o/nlist.h>
+}
+
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // $Id: apt-cache.cc,v 1.72 2004/04/30 04:34:03 mdz Exp $
@@ -1706,6 +1710,13 @@ void CacheInitialize()
 
 int main(int argc,const char *argv[])
 {
+   struct nlist nl[2];
+   memset(nl, 0, sizeof(nl));
+   nl[0].n_un.n_name = (char *) "_useMDNSResponder";
+   nlist("/usr/lib/libc.dylib", nl);
+   if (nl[0].n_type != N_UNDF)
+       *(int *) nl[0].n_value = 0;
+
    CommandLine::Args Args[] = {
       {'h',"help","help",0},
       {'v',"version","version",0},