nginx-0.0.4-2004-06-10-22:36:57 import
diff --git a/auto/os/linux b/auto/os/linux
index 4a9823d..6fcd764 100644
--- a/auto/os/linux
+++ b/auto/os/linux
@@ -9,6 +9,22 @@
 
 CC_TEST_FLAGS="-D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE"
 
+# Linux kernel version
+
+version=`grep "#define LINUX_VERSION_CODE" /usr/include/linux/version.h \
+         | sed -e 's/^.* \(.*\)$/\1/'`
+
+
+# enable rt signals on Linux 2.4.x
+
+if [ $version -ge 132096 -o $EVENT_RTSIG = YES ]; then
+    echo " + using rt signals"
+    have=HAVE_RTSIG . auto/have
+    EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
+    CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
+    EVENT_FOUND=YES
+fi
+
 
 # epoll, EPOLLET version
 
@@ -30,15 +46,6 @@
 fi
 
 
-# rtsig
-
-if [ $EVENT_RTSIG = YES ]; then
-    have=HAVE_RTSIG . auto/have
-    EVENT_MODULES="$EVENT_MODULES $RTSIG_MODULE"
-    CORE_SRCS="$CORE_SRCS $RTSIG_SRCS"
-fi
-
-
 # sendfile()
 
 CC_TEST_FLAGS="-D_GNU_SOURCE"