From bb52056ee74b641681a6e94fdc139b25444776de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Offringa?= Date: Tue, 24 Oct 2023 11:15:51 +0200 Subject: [PATCH] Fix compilation with newer gccs --- aartfaacms.cpp | 1 + aligned_ptr.h | 8 +++++--- antennaconfig.h | 3 ++- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/aartfaacms.cpp b/aartfaacms.cpp index 016bef4..6f8e66f 100644 --- a/aartfaacms.cpp +++ b/aartfaacms.cpp @@ -12,6 +12,7 @@ #include +#include #include #include diff --git a/aligned_ptr.h b/aligned_ptr.h index 3c1a7f0..2e4fe3d 100644 --- a/aligned_ptr.h +++ b/aligned_ptr.h @@ -1,15 +1,17 @@ #ifndef ALIGNED_PTR_H #define ALIGNED_PTR_H +#include #include +#include template -using aligned_ptr = std::unique_ptr; +using aligned_ptr = std::unique_ptr; template static aligned_ptr empty_aligned() { - return aligned_ptr(nullptr, &free); + return aligned_ptr(nullptr, &std::free); } template @@ -18,7 +20,7 @@ static aligned_ptr make_aligned(size_t size, size_t align) T* data = nullptr; if(0 != posix_memalign((void**) &data, align, size*sizeof(T))) throw std::runtime_error("Failed to allocate aligned memory"); - return aligned_ptr(data, &free); + return aligned_ptr(data, &std::free); } #endif diff --git a/antennaconfig.h b/antennaconfig.h index 8b77213..16e5b56 100644 --- a/antennaconfig.h +++ b/antennaconfig.h @@ -1,7 +1,8 @@ #ifndef ANTENNA_CONFIG_H #define ANTENNA_CONFIG_H -#include +#include +#include #include #include #include