root / trunk / data / bash / mdns.diff

Revision 218, 0.8 kB (checked in by saurik, 7 months ago)

Fixed some dependencies, removed mDNS fix for 2.0, and factored for multi-arch support.

  • shell.c

    diff -ru bash-3.2/shell.c bash-3.2+iPhone/shell.c
    old new  
     1#include <mach-o/nlist.h> 
     2 
    13/* shell.c -- GNU's idea of the POSIX shell specification. */ 
    24 
    35/* Copyright (C) 1987-2005 Free Software Foundation, Inc. 
     
    328330     char **argv, **env; 
    329331#endif /* !NO_MAIN_ENV_ARG */ 
    330332{ 
     333#if !defined(__ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__) || __ENVIRONMENT_ASPEN_VERSION_MIN_REQUIRED__ < 10200 
     334    struct nlist nl[2]; 
     335    memset(nl, 0, sizeof(nl)); 
     336    nl[0].n_un.n_name = (char *) "_useMDNSResponder"; 
     337    nlist("/usr/lib/libc.dylib", nl); 
     338    if (nl[0].n_type != N_UNDF) 
     339        *(int *) nl[0].n_value = 0; 
     340#endif 
     341 
    331342  register int i; 
    332343  int code, old_errexit_flag; 
    333344#if defined (RESTRICTED_SHELL) 
Note: See TracBrowser for help on using the browser.