grate-driver / xf86-video-opentegra

X.Org video driver for NVIDIA Tegra
Other
12 stars 9 forks source link

driver: check whether XF86_PDEV_SERVER_FD is defined #31

Closed digetx closed 6 years ago

digetx commented 6 years ago

This should fix building with older Xorg versions.

../../src/driver.c: In function ‘TegraProbeHardware’: ../../src/driver.c:241:38: error: ‘struct xf86_platform_device’ has no member named ‘flags’ if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) { ^ ../../src/driver.c:241:48: error: ‘XF86_PDEV_SERVER_FD’ undeclared (first use in this function) if (platform_dev && (platform_dev->flags & XF86_PDEV_SERVER_FD)) { ^ ../../src/driver.c:241:48: note: each undeclared identifier is reported only once for each function it appears in ../../src/driver.c:242:9: error: implicit declaration of function ‘xf86_get_platform_device_int_attrib’ [-Werror=implicit-function-declaration] fd = xf86_get_platform_device_int_attrib(platform_dev, ODEV_ATTRIB_FD, -1); ^ ../../src/driver.c:242:9: warning: nested extern declaration of ‘xf86_get_platform_device_int_attrib’ [-Wnested-externs] ../../src/driver.c:242:64: error: ‘ODEV_ATTRIB_FD’ undeclared (first use in this function) fd = xf86_get_platform_device_int_attrib(platform_dev, ODEV_ATTRIB_FD, -1);

Signed-off-by: Dmitry Osipenko digetx@gmail.com