Path: blob/master/thirdparty/misc/patches/ifaddrs-android-0001-complete-struct.patch
9898 views
diff --git a/thirdparty/misc/ifaddrs-android.h b/thirdparty/misc/ifaddrs-android.h1index e7d81e813f..04ff2ca58b 1006442--- a/thirdparty/misc/ifaddrs-android.h3+++ b/thirdparty/misc/ifaddrs-android.h4@@ -34,6 +34,9 @@5// Fills out a list of ifaddr structs (see below) which contain information6// about every network interface available on the host.7// See 'man getifaddrs' on Linux or OS X (nb: it is not a POSIX function).8+#ifdef __cplusplus9+extern "C" {10+#endif11struct ifaddrs {12struct ifaddrs* ifa_next;13char* ifa_name;14@@ -42,7 +45,17 @@ struct ifaddrs {15struct sockaddr* ifa_netmask;16// Real ifaddrs has broadcast, point to point and data members.17// We don't need them (yet?).18+ // We never initialize the following members. We only define them to match the ifaddrs struct.19+ union20+ {21+ struct sockaddr *ifu_broadaddr;22+ struct sockaddr *ifu_dstaddr;23+ } ifa_ifu;24+ void *ifa_data;25};26+#ifdef __cplusplus27+}28+#endif2930int getifaddrs(struct ifaddrs** result);31void freeifaddrs(struct ifaddrs* addrs);323334