Use X_LIBS from pkg-config, instead of libdir, for locating libX11
[mesa.git] / progs / xdemos / yuvrect_client.c
index 48f82cb75994496bb3920e2b1eec494235cb8178..e2b79a7c0e19443ba05b190a30438e254e068b48 100644 (file)
@@ -296,7 +296,7 @@ main(int argc, char *argv[])
    dpy = XOpenDisplay(dpyName);
    if (!dpy) {
       printf("Error: couldn't open display %s\n",
-            dpyName ? dpyName : getenv("DISPLAY"));
+            XDisplayName(dpyName));
       return -1;
    }