Blame SOURCES/libdrm-2.4.0-no-bc.patch

c5cb54
diff -uNr libdrm-2.4.69.orig/xf86drm.c libdrm-2.4.69/xf86drm.c
c5cb54
--- libdrm-2.4.69.orig/xf86drm.c	2016-07-20 20:42:39.000000000 +0200
c5cb54
+++ libdrm-2.4.69/xf86drm.c	2016-07-21 08:00:10.411599806 +0200
c5cb54
@@ -484,11 +484,6 @@
c5cb54
     int           fd;
c5cb54
 
c5cb54
     if ((fd = drmOpenMinor(0, 1, DRM_NODE_PRIMARY)) < 0) {
c5cb54
-#ifdef __linux__
c5cb54
-        /* Try proc for backward Linux compatibility */
c5cb54
-        if (!access("/proc/dri/0", R_OK))
c5cb54
-            return 1;
c5cb54
-#endif
c5cb54
         return 0;
c5cb54
     }
c5cb54
 
c5cb54
@@ -661,38 +656,6 @@
c5cb54
         }
c5cb54
     }
c5cb54
 
c5cb54
-#ifdef __linux__
c5cb54
-    /* Backward-compatibility /proc support */
c5cb54
-    for (i = 0; i < 8; i++) {
c5cb54
-        char proc_name[64], buf[512];
c5cb54
-        char *driver, *pt, *devstring;
c5cb54
-        int  retcode;
c5cb54
-
c5cb54
-        sprintf(proc_name, "/proc/dri/%d/name", i);
c5cb54
-        if ((fd = open(proc_name, 0, 0)) >= 0) {
c5cb54
-            retcode = read(fd, buf, sizeof(buf)-1);
c5cb54
-            close(fd);
c5cb54
-            if (retcode) {
c5cb54
-                buf[retcode-1] = '\0';
c5cb54
-                for (driver = pt = buf; *pt && *pt != ' '; ++pt)
c5cb54
-                    ;
c5cb54
-                if (*pt) { /* Device is next */
c5cb54
-                    *pt = '\0';
c5cb54
-                    if (!strcmp(driver, name)) { /* Match */
c5cb54
-                        for (devstring = ++pt; *pt && *pt != ' '; ++pt)
c5cb54
-                            ;
c5cb54
-                        if (*pt) { /* Found busid */
c5cb54
-                            return drmOpenByBusid(++pt, type);
c5cb54
-                        } else { /* No busid */
c5cb54
-                            return drmOpenDevice(strtol(devstring, NULL, 0),i, type);
c5cb54
-                        }
c5cb54
-                    }
c5cb54
-                }
c5cb54
-            }
c5cb54
-        }
c5cb54
-    }
c5cb54
-#endif
c5cb54
-
c5cb54
     return -1;
c5cb54
 }
c5cb54