From: <sv...@op...> - 2024-08-17 14:07:17
|
Author: manx Date: Sat Aug 17 16:07:05 2024 New Revision: 21502 URL: https://source.openmpt.org/browse/openmpt/?op=revision&rev=21502 Log: [Fix] MinGW32 runtime headers require __off64_t when including some C and/or C++ stdlib headers. This is declared in <sys/types.h>, which however is not included in some header chains. Forcibly include it in openmpt/all/BuildSettings.hpp. See r17412. Modified: trunk/OpenMPT/common/stdafx.h trunk/OpenMPT/src/mpt/base/detect_quirks.hpp trunk/OpenMPT/src/openmpt/all/BuildSettings.hpp Modified: trunk/OpenMPT/common/stdafx.h ============================================================================== --- trunk/OpenMPT/common/stdafx.h Sat Aug 17 15:15:01 2024 (r21501) +++ trunk/OpenMPT/common/stdafx.h Sat Aug 17 16:07:05 2024 (r21502) @@ -16,11 +16,6 @@ #include "openmpt/all/BuildSettings.hpp" -#if defined(__MINGW32__) && !defined(__MINGW64__) -#include <sys/types.h> -#endif - - #if defined(MODPLUG_TRACKER) #if defined(MPT_WITH_MFC) Modified: trunk/OpenMPT/src/mpt/base/detect_quirks.hpp ============================================================================== --- trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Sat Aug 17 15:15:01 2024 (r21501) +++ trunk/OpenMPT/src/mpt/base/detect_quirks.hpp Sat Aug 17 16:07:05 2024 (r21502) @@ -241,6 +241,16 @@ +#if MPT_LIBC_MINGW +// MinGW32 runtime headers require __off64_t when including some C and/or C++ stdlib headers. +// This is declared in <sys/types.h>, which howeger is not included in some header chains. +#if (defined(__MINGW32__) && !defined(__MINGW64__)) +#define MPT_LIBC_QUIRK_REQUIRES_SYS_TYPES_H +#endif +#endif + + + #if MPT_LIBC_DJGPP #define MPT_LIBC_QUIRK_NO_FENV #endif Modified: trunk/OpenMPT/src/openmpt/all/BuildSettings.hpp ============================================================================== --- trunk/OpenMPT/src/openmpt/all/BuildSettings.hpp Sat Aug 17 15:15:01 2024 (r21501) +++ trunk/OpenMPT/src/openmpt/all/BuildSettings.hpp Sat Aug 17 16:07:05 2024 (r21502) @@ -60,4 +60,12 @@ +// immediate quirk fixups + +#if defined(MPT_LIBC_QUIRK_REQUIRES_SYS_TYPES_H) +#include <sys/types.h> +#endif + + + #endif |