Skip to content

Commit 0e57fd2

Browse files
BeardOverflowetr
andauthored
Fix kernel version check for TCP_FASTOPEN support (#347)
* Fix kernel version check for TCP_FASTOPEN support * Fix indentation in TCP_FASTOPEN version check --------- Co-authored-by: Sebastiano Merlino <sebastiano@hey.com>
1 parent f15a7b0 commit 0e57fd2

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

configure.ac

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -148,14 +148,12 @@ AC_ARG_ENABLE([fastopen],
148148
AC_MSG_RESULT([$fastopen])
149149

150150
is_fastopen_supported=no;
151-
if test x"$fastopen" = x"yes"; then
152-
if test x"$is_windows" = x"no"; then
153-
if test `uname -r |cut -d. -f1` -ge 3; then
154-
if test `uname -r |cut -d. -f2` -ge 7; then
155-
CXXFLAGS="-DUSE_FASTOPEN $CXXFLAGS";
156-
is_fastopen_supported=yes;
157-
fi
158-
fi
151+
if test x"$fastopen" = x"yes" && test x"$is_windows" = x"no"; then
152+
major=`uname -r | cut -d. -f1`
153+
minor=`uname -r | cut -d. -f2`
154+
if test "$major" -ge 4 || { test "$major" -eq 3 && test "$minor" -ge 7; }; then
155+
CXXFLAGS="-DUSE_FASTOPEN $CXXFLAGS";
156+
is_fastopen_supported=yes;
159157
fi
160158
fi
161159

0 commit comments

Comments
 (0)