mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 08:34:20 +00:00
small fixes for BSD
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user