Hi there! I just tried to compile the current radeonhd on my slackware 12.2. To do this I updated xorg-macros, compiled libpciaccess and tried to compile the current git. Doing this I got following error: rhd_dump.c: In function 'main': rhd_dump.c:550: error: 'enable_device' undeclared (first use in this function) rhd_dump.c:550: error: (Each undeclared identifier is reported only once rhd_dump.c:550: error: for each function it appears in.) rhd_dump.c:551: error: implicit declaration of function 'pci_device_enable' rhd_dump.c:551: warning: nested extern declaration of 'pci_device_enable' So I searched the net and found out that this is caused by following commit: http://cgit.freedesktop.org/xorg/driver/xf86-video-radeonhd/commit/?id=9ad35... I think here some ifdef is wrong! @@ -375,14 +397,19 @@ print_help(const char* progname, const char* message, const char* msgarg) int main(int argc, char *argv[]) { +#ifdef XSERVER_LIBPCIACCESS + struct pci_device *device = NULL; + int enable_device = FALSE; +#else @@ -490,13 +532,24 @@ main(int argc, char *argv[]) } if (deviceSet) { - /* find our toy */ +#ifdef XSERVER_LIBPCIACCESS + /* Find the toy using pciaccess */ + if ((device = pci_device_find_by_slot(0, bus, dev, func)) == NULL) { + fprintf(stderr, "ERROR: Unable to find PCI device at %02X:%02X.%02X.\n", + bus, dev, func); + return 1; + } +#else + /* find our toy using pci */ device = DeviceLocate(pciAccess->devices, bus, dev, func); if (!device) { fprintf(stderr, "Unable to find PCI device at %02X:%02X.%02X.\n", bus, dev, func); return 1; } + if (enable_device) + pci_device_enable(device); +#endif I thing this + if (enable_device) + pci_device_enable(device); is not right here. 73 -- To unsubscribe, e-mail: radeonhd+unsubscribe@opensuse.org For additional commands, e-mail: radeonhd+help@opensuse.org
On Apr 30, 09 14:39:47 +0200, Johann Wilhelm wrote:
I think here some ifdef is wrong!
Right, the pci_device_enable() can be called only in the libpciaccess
case, not in the other one.
Good catch! Pushed a fix.
Matthias
--
Matthias Hopf
participants (2)
-
Johann Wilhelm
-
Matthias Hopf