Skip to content

Commit

Permalink
Merge pull request #339 from maxmind/greg/conditional-ssize-max
Browse files Browse the repository at this point in the history
Define SSIZE_MAX conditionally on Windows
  • Loading branch information
horgh authored Jan 9, 2024
2 parents 3ad3304 + 25e4203 commit a1cad85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 2 additions & 0 deletions src/maxminddb.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
#endif
#include <windows.h>
#include <ws2ipdef.h>
#ifndef SSIZE_MAX
#define SSIZE_MAX INTPTR_MAX
#endif
typedef ADDRESS_FAMILY sa_family_t;
#else
#include <arpa/inet.h>
Expand Down

0 comments on commit a1cad85

Please sign in to comment.