Skip to content

Commit 958279d

Browse files
committed
Linux: Fix build for kernels without RTA_EXPIRES
Fixes #493.
1 parent e8b2c8f commit 958279d

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/route.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,15 @@
5959
# define HAVE_ROUTE_METRIC 1
6060
# endif
6161
#endif
62-
#ifndef HAVE_ROUTE_LIFETIME
63-
# if defined(__linux__)
64-
# define HAVE_ROUTE_LIFETIME 1 /* For IPv6 routes only */
65-
# endif
66-
#endif
6762

6863
#ifdef __linux__
6964
# include <linux/version.h> /* RTA_PREF is only an enum.... */
7065
# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
7166
# define HAVE_ROUTE_PREF
7267
# endif
68+
# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
69+
# define HAVE_ROUTE_LIFETIME /* For IPv6 routes only */
70+
# endif
7371
#endif
7472

7573
#if defined(__OpenBSD__) || defined (__sun)

0 commit comments

Comments
 (0)