xref: /openbmc/openbmc/meta-openembedded/meta-oe/recipes-test/googletest/googletest/gtest-ciso646.patch (revision eaae0b339f806200d8722cb09e5e3b83c15a5956)
1https://github.com/google/googletest/issues/4701
2
3taken from fedora:
4https://src.fedoraproject.org/rpms/gtest/c/b3fe6f803a1e554971f70e1c3f55aa5fcb377b1b?branch=rawhide
5
6Upstream-Status: Pending
7Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
8
9--- ./googletest/include/gtest/internal/gtest-port.h.orig	2025-01-27 03:39:18.963893931 +0000
10+++ ./googletest/include/gtest/internal/gtest-port.h	2025-01-28 13:57:51.381081952 +0000
11@@ -288,11 +288,11 @@
12
13 // Detect C++ feature test macros as gracefully as possible.
14 // MSVC >= 19.15, Clang >= 3.4.1, and GCC >= 4.1.2 support feature test macros.
15-#if GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L && \
16-    (!defined(__has_include) || GTEST_INTERNAL_HAS_INCLUDE(<version>))
17+#if GTEST_INTERNAL_HAS_INCLUDE(<version>) || \
18+    (GTEST_INTERNAL_CPLUSPLUS_LANG >= 202002L && !defined(__has_include))
19 #include <version>  // C++20 and later
20-#elif (!defined(__has_include) || GTEST_INTERNAL_HAS_INCLUDE(<ciso646>))
21-#include <ciso646>  // Pre-C++20
22+#else
23+#include <cerrno>  // Pre-C++20
24 #endif
25
26 #include <ctype.h>   // for isspace, etc
27