aboutsummaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@sysmocom.de>2020-04-18 23:47:06 +0200
committerlaforge <laforge@osmocom.org>2020-04-19 08:29:35 +0000
commitff2ebee03baf92609dc14bb1324cd069bf5c8323 (patch)
tree58d98a488f7b55357dfcf1bb83658edf3e09c495 /configure.ac
parent2a1cedd2dc844ad6cabcd6f08791f16e0f4febae (diff)
sgsnemu: Fix build/run against linux < 4.11 (no sysctl addr_gen_mode support)
On older systems (like debian 8), the enum is not present in the header file and build will fail (as saw in osmocom's OBS instance). Furthermore, the sysctl to change the value was added at a later point in time, which means compiling can go fine but running may fail due to the sysctl not being available. This is a fix-up to Change-Id I1d51f3ca91edbb3b788939982ab63264182ec2ce Change-Id: I208970d5b16ea7148444d414b0a6f68c8d9a086c
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac9
1 files changed, 9 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index c695958..0e61729 100644
--- a/configure.ac
+++ b/configure.ac
@@ -131,6 +131,15 @@ AC_EGREP_HEADER(struct iphdr, netinet/ip.h,
AC_DEFINE([HAVE_IPHDR])],
AC_MSG_RESULT(no))
+# Address generation modes (enum) implemented in linux 3.17 (bc91b0f07ada5535427373a4e2050877bcc12218)
+# /proc/sys/net/ipv6/conf/${iface}/addr_gen_mode was added in linux 4.11 (d35a00b8e33dab7385f724e713ae71c8be0a49f4)
+AC_MSG_CHECKING(whether enum in6_addr_gen_mode.IN6_ADDR_GEN_MODE_NONE exists)
+AH_TEMPLATE(HAVE_IN6_ADDR_GEN_MODE_NONE)
+AC_EGREP_HEADER(IN6_ADDR_GEN_MODE_NONE, linux/if_link.h,
+[AC_MSG_RESULT(yes)
+ AC_DEFINE([HAVE_IN6_ADDR_GEN_MODE_NONE])],
+ AC_MSG_RESULT(no))
+
# Checks for library functions.
AC_PROG_GCC_TRADITIONAL
# AC_FUNC_MALLOC