Commit ca86fb222 for llama.cpp
commit ca86fb222e0080d4d102f4390d5c7279dffb3277
Author: Pepper Gray <hello@peppergray.xyz>
Date: Tue Sep 8 12:59:53 2026 +0200
llama : add missing headers (#28566)
* fix compile-error: add missing header
Bug: #28557
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
* fix compile-error: add missing header
Bug: #28559
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
* fix compile-error: add missing header
Bug: #28560
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
* fix compile-error: add missing header
Bug: #28561
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
* fix compile-error: add missing header
Bug: #28562
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
* fix compile-error: add missing header
Bug: #28564
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
---------
Signed-off-by: Pepper Gray <hello@peppergray.xyz>
diff --git a/ggml/src/gguf.cpp b/ggml/src/gguf.cpp
index 6c7b58178..144a8edf8 100644
--- a/ggml/src/gguf.cpp
+++ b/ggml/src/gguf.cpp
@@ -9,6 +9,7 @@
#include <cstdio>
#include <cstdlib>
#include <cstring>
+#include <cerrno>
#include <map>
#include <new>
#include <stdexcept>
diff --git a/src/llama-graph.h b/src/llama-graph.h
index b486578c1..cc4110639 100644
--- a/src/llama-graph.h
+++ b/src/llama-graph.h
@@ -6,6 +6,7 @@
#include "llama-adapter.h"
#include <cstdint>
+#include <cstdlib>
#include <vector>
#include <memory>
#include <set>
diff --git a/src/llama-mmap.cpp b/src/llama-mmap.cpp
index 4d183cbc9..715a6e354 100644
--- a/src/llama-mmap.cpp
+++ b/src/llama-mmap.cpp
@@ -6,6 +6,7 @@
#include <cstring>
#include <climits>
+#include <cstdlib>
#include <stdexcept>
#include <cerrno>
#include <algorithm>
diff --git a/src/llama-vocab.cpp b/src/llama-vocab.cpp
index a69801f08..ee65faf23 100644
--- a/src/llama-vocab.cpp
+++ b/src/llama-vocab.cpp
@@ -14,6 +14,7 @@
#include <cmath>
#include <cstdarg>
#include <cstring>
+#include <cstdlib>
#include <forward_list>
#include <limits>
#include <map>
diff --git a/tests/test-sampling.cpp b/tests/test-sampling.cpp
index d727ab632..353a5a1a1 100644
--- a/tests/test-sampling.cpp
+++ b/tests/test-sampling.cpp
@@ -7,6 +7,7 @@
#include <algorithm>
#include <cmath>
+#include <cstdlib>
#include <string>
#include <vector>
diff --git a/tools/mtmd/deprecation-warning.cpp b/tools/mtmd/deprecation-warning.cpp
index 2b31a9d8b..615d7577b 100644
--- a/tools/mtmd/deprecation-warning.cpp
+++ b/tools/mtmd/deprecation-warning.cpp
@@ -1,5 +1,6 @@
#include <clocale>
#include <cstdio>
+#include <cstdlib>
#include <string>
int main(int argc, char** argv) {