From: Jan Rękorajski Date: Fri, 22 Dec 2000 18:36:21 +0000 (+0000) Subject: - get kernel version from includes, not from uname X-Git-Tag: XFree86-4_0_2-1~3 X-Git-Url: http://git.pld-linux.org/?a=commitdiff_plain;h=627ef73fd8d0dc0d2cb4917998aeeaa4558040f0;p=packages%2FX11.git - get kernel version from includes, not from uname Changed files: XFree86-imake-kernel-version.patch -> 1.1 --- diff --git a/XFree86-imake-kernel-version.patch b/XFree86-imake-kernel-version.patch new file mode 100644 index 0000000..eb68e7e --- /dev/null +++ b/XFree86-imake-kernel-version.patch @@ -0,0 +1,53 @@ +--- XFree86-4.0.2/xc/config/imake/imake.c.orig Fri Dec 22 14:48:51 2000 ++++ XFree86-4.0.2/xc/config/imake/imake.c Fri Dec 22 14:48:46 2000 +@@ -265,6 +265,7 @@ + #if defined(linux) || defined(__GNU__) + #include + #include ++#include + #endif + #ifdef __QNX__ + #include +@@ -1225,35 +1226,15 @@ + fprintf(inFile, "#define DefaultOSName %s\n", buf); + # endif + +-# ifdef DEFAULT_OS_MAJOR_REV +- parse_utsname(&name, DEFAULT_OS_MAJOR_REV, buf, +- "Bad DEFAULT_OS_MAJOR_REV syntax %s"); +-# ifdef DEFAULT_OS_MAJOR_REV_FROB +- DEFAULT_OS_MAJOR_REV_FROB(buf, sizeof buf); +-# endif +- fprintf(inFile, "#define DefaultOSMajorVersion %s\n", +- *buf ? trim_version(buf) : "0"); +-# endif ++ fprintf(inFile, "#define DefaultOSMajorVersion %d\n", ++ LINUX_VERSION_CODE >> 16); + +-# ifdef DEFAULT_OS_MINOR_REV +- parse_utsname(&name, DEFAULT_OS_MINOR_REV, buf, +- "Bad DEFAULT_OS_MINOR_REV syntax %s"); +-# ifdef DEFAULT_OS_MINOR_REV_FROB +- DEFAULT_OS_MINOR_REV_FROB(buf, sizeof buf); +-# endif +- fprintf(inFile, "#define DefaultOSMinorVersion %s\n", +- *buf ? trim_version(buf) : "0"); +-# endif ++ fprintf(inFile, "#define DefaultOSMinorVersion %d\n", ++ (LINUX_VERSION_CODE >> 8) & 0xFF); ++ ++ fprintf(inFile, "#define DefaultOSTeenyVersion %d\n", ++ LINUX_VERSION_CODE & 0xFF); + +-# ifdef DEFAULT_OS_TEENY_REV +- parse_utsname(&name, DEFAULT_OS_TEENY_REV, buf, +- "Bad DEFAULT_OS_TEENY_REV syntax %s"); +-# ifdef DEFAULT_OS_TEENY_REV_FROB +- DEFAULT_OS_TEENY_REV_FROB(buf, sizeof buf); +-# endif +- fprintf(inFile, "#define DefaultOSTeenyVersion %s\n", +- *buf ? trim_version(buf) : "0"); +-# endif + # ifdef DEFAULT_MACHINE_ARCHITECTURE + parse_utsname(&name, DEFAULT_MACHINE_ARCHITECTURE, buf, + "Bad DEFAULT_MACHINE_ARCHITECTURE %s");