GNOME Bugzilla – Bug 320549
environ symbol fix for darwin
Last modified: 2005-11-04 08:00:48 UTC
Version details: 2.12.1 and CVS HEAD libgnome-desktop/gnome-desktop-item.c declares it: extern char **environ; which falsely assumes this symbol is defined in some system library. For OS X, the correct declaration to get the equivalent environ symbol functionality is: #include <crt_externs.h> #define environ (*_NSGetEnviron()) For portability probably best to test for the presence of that header and symbol and use their implementation if they are present.
Created attachment 54246 [details] [review] Detect and use darwin's environ compatibility symbol (patch vs CVS HEAD)
Thanks for the patch - the real fix is to use g_listenv() *** This bug has been marked as a duplicate of 124277 ***