diff options
author | Rodrigo Tobar <rtobar@icrar.org> | 2016-09-14 12:13:36 +0800 |
---|---|---|
committer | Rodrigo Tobar <rtobar@icrar.org> | 2016-09-14 12:13:36 +0800 |
commit | 83c8b7185803d658f753dd7fcb560a4cb150f92f (patch) | |
tree | 451204d9bfa22ec92ecb1b67f75936f960793972 | |
parent | be95c15db877864094f01a06084ae2d99d4a8cf3 (diff) | |
download | netifaces-83c8b7185803d658f753dd7fcb560a4cb150f92f.tar.gz |
Coping with old Linux kernels
Old Linux kernels don't define yet RTNL_FAMILY_MAX and used NPROTO instead. This
changed on linux commit 25239ce.
-rw-r--r-- | netifaces.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/netifaces.c b/netifaces.c index 27e7688..cf09adb 100644 --- a/netifaces.c +++ b/netifaces.c @@ -38,10 +38,15 @@ # include <net/route.h> # endif +/* RTNL_FAMILY_MAX not there yet in old kernels, see linux commit 25239ce */ # if HAVE_PF_NETLINK # include <asm/types.h> # include <linux/netlink.h> # include <linux/rtnetlink.h> +# if !defined(RTNL_FAMILY_MAX) +# include <linux/net.h> +# define RTNL_FAMILY_MAX NPROTO +# endif # include <arpa/inet.h> # endif |