source: trunk/dports/lang/hugs98/files/patch-packages-base-include-HsBase.h.diff @ 81676

Last change on this file since 81676 was 61500, checked in by mww@…, 9 years ago

fix the 'Undefined symbols: "_environ"' error in 10.6 (still does not build though!) (--> http://trac.macports.org/ticket/20950)

File size: 531 bytes
  • packages/base/include/HsBase.h

     
    764764
    765765/* ToDo: write a feature test that doesn't assume 'environ' to
    766766 *    be in scope at link-time. */
    767 extern char** environ;
     767#ifdef __APPLE__
     768#include <crt_externs.h>
     769#define environ (*_NSGetEnviron())
     770#else
     771 extern char **environ;
     772#endif
     773
    768774INLINE char **__hscore_environ() { return environ; }
    769775
    770776/* lossless conversions between pointers and integral types */
Note: See TracBrowser for help on using the repository browser.