From e695f1b59640760ae14fcfaecfb26d8c0bd47f3e Mon Sep 17 00:00:00 2001 From: Noah Treuhaft Date: Fri, 29 Dec 2023 12:33:36 -0500 Subject: [PATCH] Remove Windows sa_family_t typedef from public header This typedef isn't needed in maxminddb.h since sa_family_t isn't part of this library's public API. Moreover, it can conflict with typedefs in the headers of other libraries. Move the typedef from maxminddb.h to maxminddb.c, where sa_family_t is used. --- include/maxminddb.h | 2 -- src/maxminddb.c | 1 + 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/include/maxminddb.h b/include/maxminddb.h index 27080669..1455be91 100644 --- a/include/maxminddb.h +++ b/include/maxminddb.h @@ -17,8 +17,6 @@ extern "C" { #include /* libmaxminddb package version from configure */ -typedef ADDRESS_FAMILY sa_family_t; - #if defined(_MSC_VER) /* MSVC doesn't define signed size_t, copy it from configure */ #define ssize_t SSIZE_T diff --git a/src/maxminddb.c b/src/maxminddb.c index 0596568a..4349824e 100644 --- a/src/maxminddb.c +++ b/src/maxminddb.c @@ -23,6 +23,7 @@ #endif #include #include +typedef ADDRESS_FAMILY sa_family_t; #else #include #include