Skip to content

Commit

Permalink
Remove Windows sa_family_t typedef from public header
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
nwt committed Dec 29, 2023
1 parent 4a51c94 commit e695f1b
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 0 additions & 2 deletions include/maxminddb.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@ extern "C" {
#include <ws2tcpip.h>
/* 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
Expand Down
1 change: 1 addition & 0 deletions src/maxminddb.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
#endif
#include <windows.h>
#include <ws2ipdef.h>
typedef ADDRESS_FAMILY sa_family_t;
#else
#include <arpa/inet.h>
#include <sys/mman.h>
Expand Down

0 comments on commit e695f1b

Please sign in to comment.