diff --git a/CMakeLists.txt b/CMakeLists.txt index 8eff066a..8263aa4e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required (VERSION 3.9...3.30) project(maxminddb LANGUAGES C - VERSION 1.13.1 + VERSION 1.13.2 ) set(MAXMINDDB_SOVERSION 0.0.7) set(CMAKE_C_STANDARD 99) diff --git a/Changes.md b/Changes.md index 97d11180..29591851 100644 --- a/Changes.md +++ b/Changes.md @@ -1,3 +1,9 @@ +## 1.13.2 - 2026-02-25 + +- Fixed a compilation failure on macOS 26 (Tahoe) where `sys/endian.h` defines + `bswap32` and `bswap64` as macros, conflicting with our function declarations. + Reported by Anton Melnikov. GitHub #419. + ## 1.13.1 - 2026-02-24 - Re-release for Ubuntu PPA. No code changes. diff --git a/configure.ac b/configure.ac index 54b5ecd9..f35c3401 100644 --- a/configure.ac +++ b/configure.ac @@ -2,7 +2,7 @@ # Process this file with autoconf to produce a configure script. AC_PREREQ([2.63]) -AC_INIT([libmaxminddb], [1.13.1], [support@maxmind.com]) +AC_INIT([libmaxminddb], [1.13.2], [support@maxmind.com]) AC_CONFIG_SRCDIR([include/maxminddb.h]) AC_CONFIG_HEADERS([config.h include/maxminddb_config.h]) diff --git a/src/maxminddb.c b/src/maxminddb.c index 925acde9..66b69be2 100644 --- a/src/maxminddb.c +++ b/src/maxminddb.c @@ -1804,7 +1804,7 @@ static int get_entry_data_list(const MMDB_s *const mmdb, #define __has_builtin(x) 0 #endif -static inline uint32_t bswap32(uint32_t x) { +static inline uint32_t mmdb_bswap32(uint32_t x) { #if defined(_MSC_VER) return _byteswap_ulong(x); #elif __has_builtin(__builtin_bswap32) @@ -1815,7 +1815,7 @@ static inline uint32_t bswap32(uint32_t x) { #endif } -static inline uint64_t bswap64(uint64_t x) { +static inline uint64_t mmdb_bswap64(uint64_t x) { #if defined(_MSC_VER) return _byteswap_uint64(x); #elif __has_builtin(__builtin_bswap64) @@ -1837,7 +1837,7 @@ static float get_ieee754_float(const uint8_t *restrict p) { memcpy(&i, p, sizeof(uint32_t)); #if MMDB_LITTLE_ENDIAN - i = bswap32(i); + i = mmdb_bswap32(i); #endif memcpy(&f, &i, sizeof(float)); @@ -1852,7 +1852,7 @@ static double get_ieee754_double(const uint8_t *restrict p) { memcpy(&i, p, sizeof(uint64_t)); #if MMDB_LITTLE_ENDIAN - i = bswap64(i); + i = mmdb_bswap64(i); #endif memcpy(&d, &i, sizeof(double));