From 958279d63109cf8ed47f763093163e43de8d088e Mon Sep 17 00:00:00 2001
From: Roy Marples <roy@marples.name>
Date: Wed, 26 Mar 2025 10:20:45 +0000
Subject: [PATCH 1/3] Linux: Fix build for kernels without RTA_EXPIRES

Fixes #493.
---
 src/route.h | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/src/route.h b/src/route.h
index 974604f5..eea7e559 100644
--- a/src/route.h
+++ b/src/route.h
@@ -59,17 +59,15 @@
 #  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)
-- 
2.34.1

