linux-sgx/0006-Fix-compat-with-gcc-14.patch
Daniel P. Berrangé f370d400ee Initial import
Resolves: https://issues.redhat.com/browse/RHELPLAN-171792
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2025-03-19 16:55:37 +00:00

49 lines
1.6 KiB
Diff

From ec8e718cbcdce69263bb2f61df112118234df7aa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Daniel=20P=2E=20Berrang=C3=A9?= <berrange@redhat.com>
Date: Mon, 24 Jun 2024 17:36:13 +0100
Subject: [PATCH 06/13] Fix compat with gcc 14
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
With refactoring of libstdc++, the <algorithm> header is no
longer pulled in indirectly, so must be explicitly requested.
The C++ standard for aesm must also be bumped to 14 to ensure
that std::enable_if_t is available.
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
---
psw/ae/aesm_service/source/CMakeLists.txt | 2 +-
psw/enclave_common/sgx_enclave_common.cpp | 1 +
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git a/psw/ae/aesm_service/source/CMakeLists.txt b/psw/ae/aesm_service/source/CMakeLists.txt
index 3edd77c7..89b3e3ae 100644
--- a/psw/ae/aesm_service/source/CMakeLists.txt
+++ b/psw/ae/aesm_service/source/CMakeLists.txt
@@ -61,7 +61,7 @@ if(REF_LE)
endif()
set(CMAKE_CXX_STANDARD_REQUIRED 1)
-set(CMAKE_CXX_STANDARD 11)
+set(CMAKE_CXX_STANDARD 14)
set(CMAKE_SKIP_BUILD_RPATH true)
########## SGX SDK Settings ##########
diff --git a/psw/enclave_common/sgx_enclave_common.cpp b/psw/enclave_common/sgx_enclave_common.cpp
index 9867ecc8..46fcf873 100644
--- a/psw/enclave_common/sgx_enclave_common.cpp
+++ b/psw/enclave_common/sgx_enclave_common.cpp
@@ -35,6 +35,7 @@
#include <dlfcn.h>
#include <map>
#include <functional>
+#include <algorithm>
#include "sgx_enclave_common.h"
#include "sgx_urts.h"
#include "arch.h"
--
2.46.0