Red Hat Bugzilla – Bug 473459
undefined macros in drm/drm.h break userspace compilation (__user and DEPRECATED)
Last modified: 2008-11-30 03:29:19 EST
Description of problem:
drm/drm.h makes extensive use of the C preprocessor macros
__user and DEPRECATED.
Howver, in F10 drm/drm.h does not define those macros any more
like it did in F9. Those two macros are usually undefined in
userspace software, and thus compilation will fail.
The drm/drm.h in F9 (from libdrm-devel) used to contain
# define DEPRECATED __attribute__ ((deprecated))
# define DEPRECATED
which prevents the problem.
Version-Release number of selected component (if applicable):
[F-9]$ rpm -qf /usr/include/drm/drm.h
[F-10]$ rpm -qf /usr/include/drm/drm.h
Steps to Reproduce:
0. Compile any userspace software which uses drm/drm.h, without
explicitly defining the __user and DEPRECATED macros, e.g.
1. git clone git://anongit.freedesktop.org/git/xorg/driver/xf86-video-radeonhd
2. cd xf86-video-radeonhd
Compile error in radeon_drm.h due to effects of undefined __user
and DEPRECATED in code included from drm/drm.h
I guess we can also add workarounds to all userspace software which
includes drm/drm.h... but that might be the wrong place to fix it.
this is a bug in the radeonhd driver, please don't bother us with it.
they include their own radeon_drm.h which they need to fix.