maxmind / libmaxminddb

C library for the MaxMind DB file format
https://maxmind.github.io/libmaxminddb/
Apache License 2.0
912 stars 239 forks source link

Remove Windows sa_family_t typedef from public header #334

Closed nwt closed 9 months ago

nwt commented 9 months ago

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.

This change makes it possible to build Zeek with libmaxminddb on Windows using MSVC, something that currently fails because it depends on libunistd and that also defines sa_family_t.