lnx_ia64.c | 19 +++++++++++++++---- 1 files changed, 15 insertions(+), 4 deletions(-) Index: programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c =================================================================== RCS file: /cvs/xorg/xc/programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c,v retrieving revision 1.3 diff -u -d -r1.3 lnx_ia64.c --- programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c 3 Jul 2005 07:01:32 -0000 1.3 +++ programs/Xserver/hw/xfree86/os-support/linux/lnx_ia64.c 26 Aug 2005 20:04:36 -0000 @@ -32,6 +32,7 @@ #include #include #include +#include #include "ia64Pci.h" #include "Pci.h" @@ -47,11 +48,21 @@ return ZX1_CHIPSET; if (!stat("/proc/sgi_sn/licenseID", &unused)) { - /* - * We need a 2.6.11 or better kernel for Altix support - */ + int major, minor, patch; + char *c; + + /* We need a 2.6.11 or better kernel for Altix support */ uname(&utsName); - if (!strstr(utsName.release, "2.6.11")) { + c = utsName.release; + + major = atoi(c); + c = strstr(c, ".") + 1; + minor = atoi(c); + c = strstr(c, ".") + 1; + patch = atoi(c); + + if (major < 2 || (major == 2 && minor < 6) || + (major == 2 && minor == 6 && patch < 11)) { ErrorF("Kernel 2.6.11 or better needed for Altix support\n"); return NONE_CHIPSET; }