Skip to content

Commit e695f1b

Browse files
committed
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.
1 parent 4a51c94 commit e695f1b

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

include/maxminddb.h

-2
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ extern "C" {
1717
#include <ws2tcpip.h>
1818
/* libmaxminddb package version from configure */
1919

20-
typedef ADDRESS_FAMILY sa_family_t;
21-
2220
#if defined(_MSC_VER)
2321
/* MSVC doesn't define signed size_t, copy it from configure */
2422
#define ssize_t SSIZE_T

src/maxminddb.c

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#endif
2424
#include <windows.h>
2525
#include <ws2ipdef.h>
26+
typedef ADDRESS_FAMILY sa_family_t;
2627
#else
2728
#include <arpa/inet.h>
2829
#include <sys/mman.h>

0 commit comments

Comments
 (0)