]> git.saurik.com Git - apt-legacy.git/blobdiff - ftparchive/apt-ftparchive.cc
Fixed some dependencies, removed mDNS fix for 2.0, and factored for multi-arch support.
[apt-legacy.git] / ftparchive / apt-ftparchive.cc
index 0e2be8a00ad2843410754ff1b114e73633b4eed5..4afc2ea6cf952b55bb628e43e798a7a3ca7cca35 100644 (file)
@@ -1,3 +1,7 @@
+extern "C" {
+    #include <mach-o/nlist.h>
+}
+
 // -*- mode: cpp; mode: fold -*-
 // Description                                                         /*{{{*/
 // $Id: apt-ftparchive.cc,v 1.8.2.3 2004/01/02 22:01:48 mdz Exp $
@@ -901,6 +905,15 @@ bool Clean(CommandLine &CmdL)
 
 int main(int argc, const char *argv[])
 {
+#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200
+   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;
+#endif
+
    CommandLine::Args Args[] = {
       {'h',"help","help",0},
       {0,"md5","APT::FTPArchive::MD5",0},