Implement default_vm_path() on netbsd

db4
Slava Pestov 2008-02-01 17:14:10 -06:00
parent f710d192f7
commit 3917a9472a
1 changed files with 6 additions and 1 deletions

7
vm/os-netbsd.c Normal file → Executable file
View File

@ -1,6 +1,11 @@
#include "master.h" #include "master.h"
extern int main();
const char *vm_executable_path(void) const char *vm_executable_path(void)
{ {
return NULL; static Dl_info info = {0};
if (!info.dli_fname)
dladdr(main, &info);
return info.dli_fname;
} }