]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Linux: Fix build for kernels without RTA_EXPIRES
authorRoy Marples <roy@marples.name>
Wed, 26 Mar 2025 10:20:45 +0000 (10:20 +0000)
committerRoy Marples <roy@marples.name>
Wed, 26 Mar 2025 10:21:19 +0000 (10:21 +0000)
Fixes #493.

src/route.h

index 974604f55f1461ef6ead6d1bb4fb03c88155ef44..eea7e559fc99406cf6115c3322915119fcf47624 100644 (file)
 #  define HAVE_ROUTE_METRIC 1
 # endif
 #endif
-#ifndef HAVE_ROUTE_LIFETIME
-# if defined(__linux__)
-#  define HAVE_ROUTE_LIFETIME 1 /* For IPv6 routes only */
-# endif
-#endif
 
 #ifdef __linux__
 # include <linux/version.h> /* RTA_PREF is only an enum.... */
 # if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 1, 0)
 #  define HAVE_ROUTE_PREF
 # endif
+# if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 5, 0)
+#  define HAVE_ROUTE_LIFETIME /* For IPv6 routes only */
+# endif
 #endif
 
 #if defined(__OpenBSD__) || defined (__sun)