Skip to content

Commit 3319ff3

Browse files
authored
Merge pull request #61 from utilityai/58-cant-make-this-compile
fix: 58 cant make this compile
2 parents 745237d + 5e3e083 commit 3319ff3

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

Cargo.lock

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

llama-cpp-sys-2/build.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,14 @@ fn main() {
4949
llama_cpp.define("GGML_USE_CUBLAS", None);
5050
}
5151

52+
// https://github.com/ggerganov/llama.cpp/blob/191221178f51b6e81122c5bda0fd79620e547d07/Makefile#L133-L141
53+
if cfg!(target_os = "macos") {
54+
llama_cpp.define("_DARWIN_C_SOURCE", None);
55+
}
56+
if cfg!(target_os = "dragonfly") {
57+
llama_cpp.define("__BSD_VISIBLE", None);
58+
}
59+
5260
if let Some(ggml_cuda) = ggml_cuda {
5361
println!("compiling ggml-cuda");
5462
ggml_cuda.compile("ggml-cuda");

0 commit comments

Comments
 (0)