From: Michael Tremer Date: Tue, 23 Aug 2022 13:59:48 +0000 (+0100) Subject: Fix compilation on MacOS X X-Git-Tag: 0.9.15~7 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25f300f77960d60b0228638ab74651861d76034a;p=location%2Flibloc.git Fix compilation on MacOS X Signed-off-by: Michael Tremer --- diff --git a/src/address.c b/src/address.c index dd32dbc..d338243 100644 --- a/src/address.c +++ b/src/address.c @@ -22,6 +22,7 @@ #include #include +#include #define LOC_ADDRESS_BUFFERS 6 #define LOC_ADDRESS_BUFFER_LENGTH INET6_ADDRSTRLEN diff --git a/src/as-list.c b/src/as-list.c index cfb9392..50805e7 100644 --- a/src/as-list.c +++ b/src/as-list.c @@ -18,6 +18,7 @@ #include #include +#include #include struct loc_as_list { diff --git a/src/country-list.c b/src/country-list.c index 3f4ea4e..536fd9e 100644 --- a/src/country-list.c +++ b/src/country-list.c @@ -17,6 +17,7 @@ #include #include +#include #include #include #include diff --git a/src/libloc/address.h b/src/libloc/address.h index f7fe333..f4c0ee3 100644 --- a/src/libloc/address.h +++ b/src/libloc/address.h @@ -22,6 +22,8 @@ #include #include +#include + /* All of these functions are private and for internal use only */ diff --git a/src/libloc/compat.h b/src/libloc/compat.h index 8750976..aecfeb4 100644 --- a/src/libloc/compat.h +++ b/src/libloc/compat.h @@ -35,6 +35,10 @@ # define s6_addr32 __u6_addr.__u6_addr32 #endif +#ifndef reallocarray +# define reallocarray(ptr, nmemb, size) realloc(ptr, nmemb * size) +#endif + #endif #endif diff --git a/src/python/network.c b/src/python/network.c index 474b6de..c14174e 100644 --- a/src/python/network.c +++ b/src/python/network.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include