1.0.39.4: fix build on non-darwin and ppc/darwin platforms
[sbcl.git] / src / runtime / sunos-os.c
index 89c0d71..20edc80 100644 (file)
@@ -215,7 +215,7 @@ sigsegv_handler(int signal, siginfo_t *info, os_context_t *context)
 
     if (!cheneygc_handle_wp_violation(context, addr)) {
         if (!handle_guard_page_triggered(context,addr))
-            lisp_memory_fault_error(context, fault_addr);
+            lisp_memory_fault_error(context, addr);
     }
 }
 
@@ -234,13 +234,11 @@ os_install_interrupt_handlers()
 }
 
 char *
-os_get_runtime_executable_path()
+os_get_runtime_executable_path(int external)
 {
-    int ret;
     char path[] = "/proc/self/object/a.out";
 
-    ret = access(path, R_OK);
-    if (ret == -1)
+    if (external || access(path, R_OK) == -1)
         return NULL;
 
     return copied_string(path);