Add missing define for old android sdk (#2831)

define NETLINK_NO_ENOBUFS and IFA_D_DADFAILED if they don't exist
This commit is contained in:
Alexandre Janniaux 2018-03-09 22:37:21 +01:00 committed by Arvid Norberg
parent cd1b2108f1
commit 2bc2f3af0f
2 changed files with 10 additions and 0 deletions

View File

@ -68,6 +68,11 @@ POSSIBILITY OF SUCH DAMAGE.
#ifndef SOL_NETLINK #ifndef SOL_NETLINK
#define SOL_NETLINK 270 #define SOL_NETLINK 270
#endif #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 #endif
#include "libtorrent/aux_/disable_warnings_pop.hpp" #include "libtorrent/aux_/disable_warnings_pop.hpp"

View File

@ -92,6 +92,11 @@ POSSIBILITY OF SUCH DAMAGE.
#include <stdlib.h> #include <stdlib.h>
#include <unistd.h> #include <unistd.h>
#include <sys/types.h> #include <sys/types.h>
#if TORRENT_ANDROID && !defined IFA_F_DADFAILED
#define IFA_F_DADFAILED 8
#endif
#endif #endif
#if TORRENT_USE_IFADDRS #if TORRENT_USE_IFADDRS