diff options
author | Sedat Dilek <sedat.dilek@gmail.com> | 2011-02-25 17:21:52 -0500 |
---|---|---|
committer | Alex Deucher <alexdeucher@gmail.com> | 2011-02-25 18:08:01 -0500 |
commit | cb4dc7ab66016d0c980800f8dbf71bbe993889d3 (patch) | |
tree | 917cbac214d5568e5a2dabc2873ded1bd2d62df0 | |
parent | ecfdb209afe2aafc378baab8c511f5df7b000270 (diff) |
kms: Fix warning XNFprintf is deprecated
Noticed when building ati/radeon ddx against xserver 1.10-rc3.
[ build.log ]
../../src/radeon_kms.c:412:5: warning: 'XNFprintf' is deprecated (declared at /usr/include/xorg/os.h:273)
agd5f: don't break the build against pre-1.10 xservers.
Signed-off-by: Sedat Dilek <sedat.dilek@gmail.com>
Signed-off-by: Alex Deucher <alexdeucher@gmail.com>
-rw-r--r-- | src/radeon_kms.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/radeon_kms.c b/src/radeon_kms.c index 158dc57..82ee660 100644 --- a/src/radeon_kms.c +++ b/src/radeon_kms.c @@ -408,9 +408,13 @@ static Bool radeon_open_drm_master(ScrnInfoPtr pScrn) info->dri2.drm_fd = pRADEONEnt->fd; goto out; } - +#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0) + busid = XNFasprintf("pci:%04x:%02x:%02x.%d", + dev->domain, dev->bus, dev->dev, dev->func); +#else busid = XNFprintf("pci:%04x:%02x:%02x.%d", dev->domain, dev->bus, dev->dev, dev->func); +#endif info->dri2.drm_fd = drmOpen("radeon", busid); if (info->dri2.drm_fd == -1) { |