Re: [PATCH] BRe: mmapr.c compile problem

Marc Aurele La France <[email protected]>
Newsgroups gmane.comp.xfree86.devel
Message-ID <[email protected]>
On Tue, 5 Apr 2005, Marc Aurele La France wrote:
> On Tue, 5 Apr 2005, Marc Aurele La France wrote:
>> On Tue, 5 Apr 2005, Jeff Chua wrote:

>>> Here's a patch to fix mmapr.c and mmapw.c so that compile under linux.

>>> Thanks,
>>> Jeff.
>>> [ jchua AT fedex DOT com ]

 	[elided]

>> I agree with the typo fix (blush), but not with the removal of 
>> <linux/pci.h>'s inclusion.  Instead try

>> 	cd <whereever>/xc/programs/Xserver/hw/xfree86/etc
>> 	touch mmap?.c
>> 	make EXTRA_DEFINES=-DLINUX_MOD_DEVICETABLE_H mmapr mmapw

>> If this works (and it does for me), then this is a kernel bug, introduced 
>> in 2.5.62.  Report it there.  <linux/pci.h> should only #include 
>> <linux/mod_devicetable.h> when __KERNEL__ is #define'd.

>> In the meantime, the work-around for mmap?.c would be to #define 
>> LINUX_MOD_DEVICETABLE_H before #include <linux/pci.h>, but that might cause 
>> other issues later on.

> FWIW, this problem also shows up in linuxPci.c on alpha and sparc64.

I've just committed a change to fix the typo you reported and #define 
LINUX_MOD_DEVICETABLE_H where apprpriate.

Thanks.

Marc.

+----------------------------------+-----------------------------------+
|  Marc Aurele La France           |  work:   1-780-492-9310           |
|  Computing and Network Services  |  fax:    1-780-492-1729           |
|  352 General Services Building   |  email:  [email protected]          |
|  University of Alberta           +-----------------------------------+
|  Edmonton, Alberta               |                                   |
|  T6G 2H1                         |     Standard disclaimers apply    |
|  CANADA                          |                                   |
+----------------------------------+-----------------------------------+
XFree86 developer and VP.  ATI driver and X server internals.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.