Usermode/ld-acess - Fixed lack of envp
[tpg/acess2.git] / Usermode / Libraries / ld-acess.so_src / main.c
index ff715bb..59b7ef1 100644 (file)
@@ -13,6 +13,7 @@ void  *DoRelocate(void *base, char **envp, const char *Filename);
 // === Imports ===\r
 extern char    gLinkedBase[];\r
 extern tLoadedLib      gLoadedLibraries[];\r
+char   **gEnvP;\r
  \r
 // === CODE ===\r
 /**\r
@@ -20,10 +21,12 @@ extern tLoadedLib   gLoadedLibraries[];
  \brief Library entry point\r
  \note This is the entrypoint for the library\r
 */\r
-void *SoMain(void *base)\r
+void *SoMain(void *base, int argc, char **argv, char **envp)\r
 {\r
        void    *ret;\r
         \r
+       gEnvP = envp;\r
+\r
        // - Assume that the file pointer will be less than 4096\r
        if((intptr_t)base < 0x1000) {\r
                SysDebug("ld-acess - SoMain: Passed file pointer %i\n", base);\r

UCC git Repository :: git.ucc.asn.au