From 57ed1aab14b0cd4024d14c04b1ec4a39ad6ad324 Mon Sep 17 00:00:00 2001 From: JuiceyDev Date: Fri, 6 Mar 2026 08:31:58 +0100 Subject: [PATCH] fix: prevent zlib Byte typedef clash with project class Byte under clang --- Minecraft.World/IO/Streams/Compression.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Minecraft.World/IO/Streams/Compression.cpp b/Minecraft.World/IO/Streams/Compression.cpp index ec91d5adc..45c6f11b6 100644 --- a/Minecraft.World/IO/Streams/Compression.cpp +++ b/Minecraft.World/IO/Streams/Compression.cpp @@ -1,7 +1,13 @@ #include "../../Build/stdafx.h" #include "Compression.h" #if defined __ORBIS__ || defined __PS3__ || defined _DURANGO || defined _WIN64 || defined __linux__ +// zconf.h defines "typedef unsigned char Byte" which conflicts with the +// project's "class Byte" from BasicTypeContainers.h (via stdafx.h). +// Rename zlib's Byte to zlib_Byte before the include so the typedef lands +// under that alias; Bytef (= Byte FAR) will resolve to zlib_Byte as well. +#define Byte zlib_Byte #include +#undef Byte #endif #if defined __PSVITA__