From cc938cf22860bcc06635e17ac23a0095f1e36b04 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20=C3=81ngel=20Pastrana?= Date: Sun, 24 Aug 2025 23:27:49 +0200 Subject: [PATCH] Fix kernel version check for TCP_FASTOPEN support --- configure.ac | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/configure.ac b/configure.ac index 66b8e757..e02691b5 100644 --- a/configure.ac +++ b/configure.ac @@ -149,14 +149,12 @@ AC_ARG_ENABLE([fastopen], AC_MSG_RESULT([$fastopen]) is_fastopen_supported=no; -if test x"$fastopen" = x"yes"; then - if test x"$is_windows" = x"no"; then - if test `uname -r |cut -d. -f1` -ge 3; then - if test `uname -r |cut -d. -f2` -ge 7; then - CXXFLAGS="-DUSE_FASTOPEN $CXXFLAGS"; - is_fastopen_supported=yes; - fi - fi +if test x"$fastopen" = x"yes" && test x"$is_windows" = x"no"; then + major=`uname -r | cut -d. -f1` + minor=`uname -r | cut -d. -f2` + if test "$major" -ge 4 || { test "$major" -eq 3 && test "$minor" -ge 7; }; then + CXXFLAGS="-DUSE_FASTOPEN $CXXFLAGS"; + is_fastopen_supported=yes; fi fi