Gentoo Archives: gentoo-user

From: "Stefan G. Weichinger" <lists@×××××.at>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Re: Building the nvidia and ati proprietary drivers against the latest kernel.git
Date: Wed, 18 Apr 2012 18:53:25
Message-Id: 4F8F0CFC.9000809@xunil.at
In Reply to: [gentoo-user] Re: Building the nvidia and ati proprietary drivers against the latest kernel.git by walt
1 Am 2012-04-18 15:25, schrieb walt:
2
3 > Hey, I just pulled from Linus again and emerged nvidia-drivers and I see
4 > that the test for kernel version no longer fails. The rest of the fix is
5 > trivial now:
6 >
7 > diff -ur kernel/nv-linux.h nvidia/nv-linux.h
8 > --- kernel/nv-linux.h 2012-04-05 21:37:05.000000000 -0700
9 > +++ nvidia/nv-linux.h 2012-04-12 06:58:31.000000000 -0700
10 > @@ -111,7 +111,6 @@
11 > #include <linux/timer.h>
12 >
13 > #include <asm/div64.h> /* do_div() */
14 > -#include <asm/system.h> /* cli, sli, save_flags */
15 > #include <asm/io.h> /* ioremap, virt_to_phys */
16 > #include <asm/uaccess.h> /* access_ok */
17 > #include <asm/page.h> /* PAGE_OFFSET */
18 > @@ -1204,7 +1203,6 @@
19 > #endif
20 >
21 > #if !defined(KERNEL_2_4) && !defined(NV_PM_MESSAGE_T_PRESENT)
22 > -typedef u32 pm_message_t;
23 > #endif
24 >
25 > #if defined(KERNEL_2_4) && (defined(CONFIG_APM) || defined(CONFIG_APM_MODULE))
26 >
27 > This works because a recent kernel commit removed system.h completely and now
28 > the #include system.h is not needed. Also, any time you see a "previously
29 > defined" error you can try to work around it by deleting the #include that
30 > introduced the "previous definition" in the first place. May work, may not,
31 > but it's always worth trying. This time it worked :)
32
33 Yes, my fix was nearly the same.
34
35 I removed the same include as you in nv-linux.h, additionally one in
36 conftest.sh (also including system.h).
37
38 Worked ok on my ~amd64 with git-sources-3.4.0-rc3
39
40 now for the vmware-modules ;-)
41
42 Stefan