]> git.ipfire.org Git - people/ms/libloc.git/commitdiff
Fix compilation on MacOS X
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Aug 2022 13:59:48 +0000 (14:59 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 23 Aug 2022 14:19:03 +0000 (15:19 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/address.c
src/as-list.c
src/country-list.c
src/libloc/address.h
src/libloc/compat.h
src/python/network.c

index dd32dbc17d1d7313fb1b1bd0d31536728e35e8c9..d33824333f7e3f589428e00290d28d6552041524 100644 (file)
@@ -22,6 +22,7 @@
 #include <string.h>
 
 #include <libloc/address.h>
+#include <libloc/compat.h>
 
 #define LOC_ADDRESS_BUFFERS                            6
 #define LOC_ADDRESS_BUFFER_LENGTH              INET6_ADDRSTRLEN
index cfb93923ba065a757ab97aa6dd6d9eeefb4fd1bf..50805e771b2d7c09ada7bf94b93bf511b1c4ad7e 100644 (file)
@@ -18,6 +18,7 @@
 
 #include <libloc/as.h>
 #include <libloc/as-list.h>
+#include <libloc/compat.h>
 #include <libloc/private.h>
 
 struct loc_as_list {
index 3f4ea4e8a6ecd357619e92dbd26a55147cfd5549..536fd9e121c08ff6b98784de36b99e121647a8ba 100644 (file)
@@ -17,6 +17,7 @@
 #include <errno.h>
 #include <stdlib.h>
 
+#include <libloc/compat.h>
 #include <libloc/country.h>
 #include <libloc/country-list.h>
 #include <libloc/private.h>
index f7fe333a9ee6133557becc43aee1ec5337a40858..f4c0ee330bc0df62b1dfcc4a2476800d081d2bc2 100644 (file)
@@ -22,6 +22,8 @@
 #include <errno.h>
 #include <netinet/in.h>
 
+#include <libloc/compat.h>
+
 /*
        All of these functions are private and for internal use only
 */
index 87509766265dc1f2e3bb239811942309e6eb51a3..aecfeb41cfe4a978d31c33c23a2d705b1ad52230 100644 (file)
 #  define s6_addr32 __u6_addr.__u6_addr32
 #endif
 
+#ifndef reallocarray
+#  define reallocarray(ptr, nmemb, size) realloc(ptr, nmemb * size)
+#endif
+
 #endif
 
 #endif
index 474b6de279969cbf875daf6157d12b0253bd16e8..c14174e3610d21de7342dfe3dce969d76220f4fb 100644 (file)
@@ -19,6 +19,7 @@
 #include <errno.h>
 #include <limits.h>
 
+#include <libloc/compat.h>
 #include <libloc/libloc.h>
 #include <libloc/network.h>
 #include <libloc/network-list.h>