From 2bc2f3af0fb973e9fb7c07d4db3ec49842520375 Mon Sep 17 00:00:00 2001 From: Alexandre Janniaux Date: Fri, 9 Mar 2018 22:37:21 +0100 Subject: [PATCH] Add missing define for old android sdk (#2831) define NETLINK_NO_ENOBUFS and IFA_D_DADFAILED if they don't exist --- include/libtorrent/socket.hpp | 5 +++++ src/enum_net.cpp | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/include/libtorrent/socket.hpp b/include/libtorrent/socket.hpp index 1940f7acd..bbd81e6d7 100644 --- a/include/libtorrent/socket.hpp +++ b/include/libtorrent/socket.hpp @@ -68,6 +68,11 @@ POSSIBILITY OF SUCH DAMAGE. #ifndef SOL_NETLINK #define SOL_NETLINK 270 #endif + +// NETLINK_NO_ENOBUFS exists at least since android 2.3, but is not exposed +#if TORRENT_ANDROID && !defined NETLINK_NO_ENOBUFS +#define NETLINK_NO_ENOBUFS 5 +#endif #endif #include "libtorrent/aux_/disable_warnings_pop.hpp" diff --git a/src/enum_net.cpp b/src/enum_net.cpp index ab5b85685..4bc176f27 100644 --- a/src/enum_net.cpp +++ b/src/enum_net.cpp @@ -92,6 +92,11 @@ POSSIBILITY OF SUCH DAMAGE. #include #include #include + +#if TORRENT_ANDROID && !defined IFA_F_DADFAILED +#define IFA_F_DADFAILED 8 +#endif + #endif #if TORRENT_USE_IFADDRS