Merge pull request #4972 from mneumann/dragonfly-fix-compile

Fix compile on Dragonfly
This commit is contained in:
Andrew Kelley 2020-04-07 13:04:37 -04:00 committed by GitHub
commit a20f3e3f02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 2 deletions

View File

@ -13,6 +13,7 @@ find_path(CLANG_INCLUDE_DIRS NAMES clang/Frontend/ASTUnit.h
/usr/lib/llvm-10/include
/usr/lib/llvm-10.0/include
/usr/local/llvm100/include
/usr/local/llvm10/include
/mingw64/include)
macro(FIND_AND_ADD_CLANG_LIB _libname_)
@ -24,6 +25,7 @@ macro(FIND_AND_ADD_CLANG_LIB _libname_)
/usr/lib/llvm-10/lib
/usr/lib/llvm-10.0/lib
/usr/local/llvm100/lib
/usr/local/llvm10/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib)

View File

@ -10,12 +10,14 @@ find_path(LLD_INCLUDE_DIRS NAMES lld/Common/Driver.h
PATHS
/usr/lib/llvm-10/include
/usr/local/llvm100/include
/usr/local/llvm10/include
/mingw64/include)
find_library(LLD_LIBRARY NAMES lld-10.0 lld100 lld
PATHS
/usr/lib/llvm-10/lib
/usr/local/llvm100/lib
/usr/local/llvm10/lib
)
if(EXISTS ${LLD_LIBRARY})
set(LLD_LIBRARIES ${LLD_LIBRARY})
@ -27,6 +29,7 @@ else()
${LLD_LIBDIRS}
/usr/lib/llvm-10/lib
/usr/local/llvm100/lib
/usr/local/llvm10/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:/msys64/mingw64/lib)

View File

@ -9,7 +9,7 @@
if("${ZIG_TARGET_TRIPLE}" STREQUAL "native")
find_program(LLVM_CONFIG_EXE
NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config
NAMES llvm-config-10 llvm-config-10.0 llvm-config100 llvm-config10 llvm-config
PATHS
"/mingw64/bin"
"/c/msys64/mingw64/bin"
@ -130,6 +130,7 @@ else()
/usr/lib/llvm-10/include
/usr/lib/llvm-10.0/include
/usr/local/llvm100/include
/usr/local/llvm10/include
/mingw64/include)
macro(FIND_AND_ADD_LLVM_LIB _libname_)
@ -141,6 +142,7 @@ else()
/usr/lib/llvm-10/lib
/usr/lib/llvm-10.0/lib
/usr/local/llvm100/lib
/usr/local/llvm10/lib
/mingw64/lib
/c/msys64/mingw64/lib
c:\\msys64\\mingw64\\lib)

View File

@ -244,6 +244,12 @@ pub const KERN_MAXID = 37;
pub const HOST_NAME_MAX = 255;
// access function
pub const F_OK = 0; // test for existence of file
pub const X_OK = 1; // test for execute or search permission
pub const W_OK = 2; // test for write permission
pub const R_OK = 4; // test for read permission
pub const O_RDONLY = 0;
pub const O_NDELAY = O_NONBLOCK;
pub const O_WRONLY = 1;
@ -277,7 +283,6 @@ pub const SEEK_END = 2;
pub const SEEK_DATA = 3;
pub const SEEK_HOLE = 4;
pub const F_OK = 0;
pub const F_ULOCK = 0;
pub const F_LOCK = 1;
pub const F_TLOCK = 2;