getifaddrs: Fix building on systems without IFF_SLAVE.

This commit is contained in:
Justin Maggard 2014-02-03 11:57:34 -08:00
parent 582dd80f3b
commit 67fd1fe45a

View File

@ -44,18 +44,21 @@
#include "config.h" #include "config.h"
#if HAVE_GETIFADDRS #if HAVE_GETIFADDRS
#include <ifaddrs.h> # include <ifaddrs.h>
#ifdef __linux__ # ifdef __linux__
#ifndef AF_LINK # ifndef AF_LINK
#define AF_LINK AF_INET # define AF_LINK AF_INET
#endif # endif
#else # else
#include <net/if_dl.h> # include <net/if_dl.h>
#endif # endif
# ifndef IFF_SLAVE
# define IFF_SLAVE 0
# endif
#endif #endif
#ifdef HAVE_NETLINK #ifdef HAVE_NETLINK
#include <linux/rtnetlink.h> # include <linux/rtnetlink.h>
#include <linux/netlink.h> # include <linux/netlink.h>
#endif #endif
#include "upnpglobalvars.h" #include "upnpglobalvars.h"
#include "getifaddr.h" #include "getifaddr.h"