From 25e42032b6fe3496bd3d4282d04a80ab6d2a2ab9 Mon Sep 17 00:00:00 2001 From: Gregory Oschwald Date: Tue, 9 Jan 2024 14:15:29 -0800 Subject: [PATCH] Define SSIZE_MAX conditionally on Windows --- Changes.md | 6 ++++++ src/maxminddb.c | 2 ++ 2 files changed, 8 insertions(+) diff --git a/Changes.md b/Changes.md index 859b1e86..e7f38760 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,9 @@ +## 1.9.1 + +* `SSIZE_MAX` is now defined conditionally on Windows. The 1.9.0 + release would cause a redefinition warning when compiled with MinGW. + Reported by Andreas Vögele. GitHub #338. + ## 1.9.0 - 2024-01-09 * On very large databases, the calculation to determine the search tree diff --git a/src/maxminddb.c b/src/maxminddb.c index 7da07854..47e4ae15 100644 --- a/src/maxminddb.c +++ b/src/maxminddb.c @@ -23,7 +23,9 @@ #endif #include #include +#ifndef SSIZE_MAX #define SSIZE_MAX INTPTR_MAX +#endif typedef ADDRESS_FAMILY sa_family_t; #else #include