small fixes for BSD

This commit is contained in:
Araq
2012-04-06 22:43:00 +02:00
parent ba3f90cc25
commit 039f21ffd6
2 changed files with 4 additions and 1 deletions

View File

@@ -63,6 +63,9 @@ hint[LineTooLong]=off
gcc.options.linker = "-ldl"
clang.options.linker = "-ldl"
tcc.options.linker = "-ldl"
@else:
# BSD got posix_spawn only recently, so we deactivate it for osproc:
define:useFork
@end
@end

View File

@@ -1377,7 +1377,7 @@ proc getAppFilename*(): string {.rtl, extern: "nos$1".} =
result = getApplAux("/proc/" & $getpid() & "/path/a.out")
elif defined(bsd):
result = getApplAux("/proc/" & $getpid() & "/file")
elif defined(macosx):
elif defined(macosx) or defined(bsd):
var size: int32
getExecPath1(nil, size)
result = newString(int(size))