Commit 3a64c4b4 authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Define RTA_TABLE for old libc.

It's an enum, not a #define, so the #ifdef RTA_TABLE never triggered.
parent 8d5dfdb5
...@@ -40,6 +40,10 @@ THE SOFTWARE. ...@@ -40,6 +40,10 @@ THE SOFTWARE.
#include <linux/netlink.h> #include <linux/netlink.h>
#include <linux/rtnetlink.h> #include <linux/rtnetlink.h>
#if (__GLIBC__ < 2) || (__GLIBC__ == 2 && __GLIBC_MINOR__ <= 5)
#define RTA_TABLE 15
#endif
#include "babel.h" #include "babel.h"
#include "kernel.h" #include "kernel.h"
#include "util.h" #include "util.h"
...@@ -767,11 +771,9 @@ parse_kernel_route_rta(struct rtmsg *rtm, int len, struct kernel_route *route) ...@@ -767,11 +771,9 @@ parse_kernel_route_rta(struct rtmsg *rtm, int len, struct kernel_route *route)
if(route->metric < 0 || route->metric > KERNEL_INFINITY) if(route->metric < 0 || route->metric > KERNEL_INFINITY)
route->metric = KERNEL_INFINITY; route->metric = KERNEL_INFINITY;
break; break;
#ifdef RTA_TABLE
case RTA_TABLE: case RTA_TABLE:
table = *(int*)RTA_DATA(rta); table = *(int*)RTA_DATA(rta);
break; break;
#endif
default: default:
break; break;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment