nixpkgs-suyu/pkgs/servers/x11/xorg/xorgserver-dri-path.patch

20 lines
780 B
Diff
Raw Normal View History

2012-07-14 21:03:36 +02:00
diff -Naur xorg-server-1.12.2-orig/glx/glxdricommon.c xorg-server-1.12.2/glx/glxdricommon.c
--- xorg-server-1.12.2-orig/glx/glxdricommon.c 2012-05-17 13:09:02.000000000 -0400
+++ xorg-server-1.12.2/glx/glxdricommon.c 2012-07-14 14:57:37.972791909 -0400
@@ -219,10 +219,14 @@
int i;
void *driver;
char filename[PATH_MAX];
+ char *real_dri_driver_path;
const __DRIextension **extensions;
2012-07-14 21:03:36 +02:00
+ real_dri_driver_path = getenv("XORG_DRI_DRIVER_PATH");
+ if (!real_dri_driver_path) real_dri_driver_path = dri_driver_path;
+
snprintf(filename, sizeof filename, "%s/%s_dri.so",
- dri_driver_path, driverName);
+ real_dri_driver_path, driverName);
2012-07-14 21:03:36 +02:00
driver = dlopen(filename, RTLD_LAZY | RTLD_LOCAL);
if (driver == NULL) {