]> git.pld-linux.org Git - packages/XFree86.git/blob - XFree86-imake-kernel-version.patch
- get kernel version from includes, not from uname
[packages/XFree86.git] / XFree86-imake-kernel-version.patch
1 --- XFree86-4.0.2/xc/config/imake/imake.c.orig  Fri Dec 22 14:48:51 2000
2 +++ XFree86-4.0.2/xc/config/imake/imake.c       Fri Dec 22 14:48:46 2000
3 @@ -265,6 +265,7 @@
4  #if defined(linux) || defined(__GNU__)
5  #include <limits.h>
6  #include <stdio.h>
7 +#include <linux/version.h>
8  #endif
9  #ifdef __QNX__
10  #include <unix.h>
11 @@ -1225,35 +1226,15 @@
12                 fprintf(inFile, "#define DefaultOSName %s\n", buf);
13  # endif
14  
15 -# ifdef DEFAULT_OS_MAJOR_REV
16 -       parse_utsname(&name, DEFAULT_OS_MAJOR_REV, buf,
17 -                     "Bad DEFAULT_OS_MAJOR_REV syntax %s");
18 -#  ifdef DEFAULT_OS_MAJOR_REV_FROB
19 -       DEFAULT_OS_MAJOR_REV_FROB(buf, sizeof buf);
20 -#  endif
21 -       fprintf(inFile, "#define DefaultOSMajorVersion %s\n",
22 -               *buf ? trim_version(buf) : "0");
23 -# endif
24 +       fprintf(inFile, "#define DefaultOSMajorVersion %d\n",
25 +               LINUX_VERSION_CODE >> 16);
26  
27 -# ifdef DEFAULT_OS_MINOR_REV
28 -       parse_utsname(&name, DEFAULT_OS_MINOR_REV, buf,
29 -                     "Bad DEFAULT_OS_MINOR_REV syntax %s");
30 -#  ifdef DEFAULT_OS_MINOR_REV_FROB
31 -       DEFAULT_OS_MINOR_REV_FROB(buf, sizeof buf);
32 -#  endif
33 -       fprintf(inFile, "#define DefaultOSMinorVersion %s\n",
34 -               *buf ? trim_version(buf) : "0");
35 -# endif
36 +       fprintf(inFile, "#define DefaultOSMinorVersion %d\n",
37 +               (LINUX_VERSION_CODE >> 8) & 0xFF);
38 +
39 +       fprintf(inFile, "#define DefaultOSTeenyVersion %d\n",
40 +               LINUX_VERSION_CODE & 0xFF);
41  
42 -# ifdef DEFAULT_OS_TEENY_REV
43 -       parse_utsname(&name, DEFAULT_OS_TEENY_REV, buf,
44 -                     "Bad DEFAULT_OS_TEENY_REV syntax %s");
45 -#  ifdef DEFAULT_OS_TEENY_REV_FROB
46 -       DEFAULT_OS_TEENY_REV_FROB(buf, sizeof buf);
47 -#  endif
48 -       fprintf(inFile, "#define DefaultOSTeenyVersion %s\n",
49 -               *buf ? trim_version(buf) : "0");
50 -# endif
51  # ifdef DEFAULT_MACHINE_ARCHITECTURE
52         parse_utsname(&name, DEFAULT_MACHINE_ARCHITECTURE, buf, 
53                       "Bad DEFAULT_MACHINE_ARCHITECTURE %s");
This page took 0.032218 seconds and 4 git commands to generate.