small fixes for BSD
This commit is contained in:
parent
ba3f90cc25
commit
039f21ffd6
2 changed files with 4 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue