diff mbox

kms: Fix warning XNFprintf is deprecated (v2)

Message ID 1298750662-14688-1-git-send-email-sedat.dilek@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Sedat Dilek Feb. 26, 2011, 8:04 p.m. UTC
None
diff mbox

Patch

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 158dc57..adf9b70 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -409,8 +409,13 @@  static Bool radeon_open_drm_master(ScrnInfoPtr pScrn)
 	goto out;
     }
 
+#if XORG_VERSION_CURRENT >= XORG_VERSION_NUMERIC(1,9,99,901,0)
+    XNFasprintf(&busid, "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) {