Closed pbiering closed 3 years ago
That's because you forcefully redefine NI_MAXHOST
in your code (see lib/ipv6calc_inttypes.h). At one point (in libipv6calc_db_wrapper_IP2Location.h) with NI_MAXHOST coming from system is in use, thus declaring array of one size; then [ipv6calc_inttypes.h] gets included in source code file as well, and then array gets defined with a different size.
Correct solution would be either to stop defining NI_MAXHOST
, or make sure compatibility header(-s) defining all such things come in all source code files exactly between system and local headers.
Oh, and using NI_MAXHOST
instead of PATH_MAX
for filesystem paths sounds like a very bad idea.
Thank you for digging into, will review and fix this next.
Oh, and using
NI_MAXHOST
instead ofPATH_MAX
for filesystem paths sounds like a very bad idea.
Replacement of NI_MAXHOST
by PATH_MAX
where applicable: https://github.com/pbiering/ipv6calc/commit/01a949a7cd854ea521efde577eeeeb1022b1e12c
Replacement of NI_MAXHOST
by IPV6CALC_STRING_MAX
where still used: https://github.com/pbiering/ipv6calc/commit/9b8170f10469270a273a5b8f6bfcd68db1299f8f
Currently idea missing how to proper fix this without breaking existing code: