From 11afe5f7d635bc98b28017404b09bf8fc7db61b9 Mon Sep 17 00:00:00 2001 From: MarcDufresne Date: Sat, 20 Jun 2026 21:40:13 -0400 Subject: [PATCH 1/2] disambiguate size_t to Json::Value assignment on LP64 (macOS) On 64-bit macOS size_t is unsigned long while jsoncpp's uint64_t is unsigned long long (a distinct type), so the assignment is ambiguous across jsoncpp's UInt/Int64/UInt64 converting constructors. It compiles on Linux x64 only because there uint64_t == unsigned long. Cast explicitly to Json::UInt64. --- Archipelago.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Archipelago.cpp b/Archipelago.cpp index 47d4fc5..eed0f61 100644 --- a/Archipelago.cpp +++ b/Archipelago.cpp @@ -580,7 +580,11 @@ void AP_SendItems(AP_State* state, std::set const& locations) { Json::Value fake_msg; fake_msg[0]["cmd"] = "ReceivedItems"; - fake_msg[0]["index"] = state->last_item_idx+1; + // size_t (unsigned long on LP64 macOS) is ambiguous across jsoncpp's + // UInt/Int64/UInt64 converting constructors because uint64_t is + // unsigned long long here (distinct from size_t). On Linux x64 uint64_t + // == unsigned long, so it resolved by exact match there. Cast explicitly. + fake_msg[0]["index"] = static_cast(state->last_item_idx + 1); fake_msg[0]["items"] = Json::arrayValue; for (int64_t location_id : new_locations) { int64_t recv_item_id = state->location_to_item[location_id]; From 6b1ab15d50af2b19f76f92b9fa9d420b4a7be38d Mon Sep 17 00:00:00 2001 From: MarcDufresne Date: Sun, 21 Jun 2026 14:56:45 -0400 Subject: [PATCH 2/2] add macOS build instructions to the README --- README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/README.md b/README.md index da7632c..969cf15 100644 --- a/README.md +++ b/README.md @@ -58,3 +58,8 @@ Clone the Repo recursively! - Enter the folder - `cmake .. -DWIN32=1` (If on MinGW, also add `-DMINGW=1`. If `zlib` is not installed add `-DUSE_ZLIB=OFF`) - `cmake --build .` +## macOS +- Create a folder `build` +- `cd build` +- `cmake ..` (builds for the host architecture; for a specific arch or a universal build add e.g. `-DCMAKE_OSX_ARCHITECTURES=arm64`, `x86_64`, or `"arm64;x86_64"`) +- `cmake --build .`