From 804a2964a075127808dcb8258b188ae2d510f3dd Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sun, 24 May 2020 10:11:40 +0300 Subject: [PATCH] - fixed compilation of POSIX targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit source/common/objects/dobject.h:276:21: error: use of undeclared identifier 'malloc_size' source/common/utility/m_alloc.h:45:22: error: ‘malloc_usable_size’ was not declared in this scope source/common/engine/m_random.h:40:10: fatal error: SFMT/SFMTObj.h: No such file or directory source/common/objects/__autostart.cpp:94:10: fatal error: 'doomtype.h' file not found source/common/objects/zzautozend.cpp:58:10: fatal error: 'doomtype.h' file not found --- source/common/engine/m_random.h | 2 +- source/common/objects/__autostart.cpp | 2 +- source/common/objects/zzautozend.cpp | 2 +- source/common/utility/m_alloc.h | 2 ++ 4 files changed, 5 insertions(+), 3 deletions(-) diff --git a/source/common/engine/m_random.h b/source/common/engine/m_random.h index edcc82c9a..d9eec6c44 100644 --- a/source/common/engine/m_random.h +++ b/source/common/engine/m_random.h @@ -37,7 +37,7 @@ #include #include "basics.h" -#include "SFMT/SFMTObj.h" +#include "sfmt/SFMTObj.h" class FSerializer; diff --git a/source/common/objects/__autostart.cpp b/source/common/objects/__autostart.cpp index 13e104d75..d33fc6126 100644 --- a/source/common/objects/__autostart.cpp +++ b/source/common/objects/__autostart.cpp @@ -91,7 +91,7 @@ __declspec(allocate(".yreg$a")) void *const YRegHead = 0; #elif defined(__GNUC__) -#include "doomtype.h" +#include "basics.h" // I don't know of an easy way to merge sections together with the GNU linker, // so GCC users will see all of these sections appear in the final executable. diff --git a/source/common/objects/zzautozend.cpp b/source/common/objects/zzautozend.cpp index 18c020310..c5a48b62f 100644 --- a/source/common/objects/zzautozend.cpp +++ b/source/common/objects/zzautozend.cpp @@ -55,7 +55,7 @@ __declspec(allocate(".yreg$z")) void *const YRegTail = 0; #elif defined(__GNUC__) -#include "doomtype.h" +#include "basics.h" void *const ARegTail __attribute__((section(SECTION_AREG))) = 0; void *const CRegTail __attribute__((section(SECTION_CREG))) = 0; diff --git a/source/common/utility/m_alloc.h b/source/common/utility/m_alloc.h index 3da124bff..76c4947bc 100644 --- a/source/common/utility/m_alloc.h +++ b/source/common/utility/m_alloc.h @@ -38,10 +38,12 @@ #include #if defined(__APPLE__) +#include #define _msize(p) malloc_size(p) #elif defined(__solaris__) || defined(__OpenBSD__) #define _msize(p) (*((size_t*)(p)-1)) #elif !defined(_WIN32) +#include #define _msize(p) malloc_usable_size(p) // from glibc/FreeBSD #endif