git: fd01963cc3db - stable/13 - usr.bin/dtc: Include <limits> for std::numeric_limits<>.
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 13 Jul 2022 18:48:23 UTC
The branch stable/13 has been updated by jhb:
URL: https://cgit.FreeBSD.org/src/commit/?id=fd01963cc3db6a88565dfdcd3532a41a53a35ff1
commit fd01963cc3db6a88565dfdcd3532a41a53a35ff1
Author: John Baldwin <jhb@FreeBSD.org>
AuthorDate: 2022-06-09 17:20:03 +0000
Commit: John Baldwin <jhb@FreeBSD.org>
CommitDate: 2022-07-13 18:45:51 +0000
usr.bin/dtc: Include <limits> for std::numeric_limits<>.
This is needed when building natively as a cross-tool on hosts such as
Linux using more recent versions of libstdc++.
Co-authored-by: Alexander Richardson <arichardson@FreeBSD.org>
Obtained from: CheriBSD
(cherry picked from commit 1c44d2bf86834a7214e0cc7bde7c956b5b02fd21)
---
usr.bin/dtc/fdt.cc | 1 +
usr.bin/dtc/input_buffer.cc | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/usr.bin/dtc/fdt.cc b/usr.bin/dtc/fdt.cc
index 3c7b2a8bd9ab..0080a7d445f2 100644
--- a/usr.bin/dtc/fdt.cc
+++ b/usr.bin/dtc/fdt.cc
@@ -38,6 +38,7 @@
#include "dtb.hh"
#include <algorithm>
+#include <limits>
#include <sstream>
#include <ctype.h>
diff --git a/usr.bin/dtc/input_buffer.cc b/usr.bin/dtc/input_buffer.cc
index 1f4775c8b78c..052178949cb2 100644
--- a/usr.bin/dtc/input_buffer.cc
+++ b/usr.bin/dtc/input_buffer.cc
@@ -35,7 +35,6 @@
#include "input_buffer.hh"
#include <ctype.h>
#include <errno.h>
-#include <limits.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
@@ -44,6 +43,7 @@
#ifndef NDEBUG
#include <iostream>
#endif
+#include <limits>
#include <sys/stat.h>