aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/packages/rpm/el5/SOURCES/mesa-7.6-glx13-app-warning.patch
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/packages/rpm/el5/SOURCES/mesa-7.6-glx13-app-warning.patch')
-rw-r--r--contrib/packages/rpm/el5/SOURCES/mesa-7.6-glx13-app-warning.patch28
1 files changed, 28 insertions, 0 deletions
diff --git a/contrib/packages/rpm/el5/SOURCES/mesa-7.6-glx13-app-warning.patch b/contrib/packages/rpm/el5/SOURCES/mesa-7.6-glx13-app-warning.patch
new file mode 100644
index 00000000..c23bc0e5
--- /dev/null
+++ b/contrib/packages/rpm/el5/SOURCES/mesa-7.6-glx13-app-warning.patch
@@ -0,0 +1,28 @@
+diff -up mesa-20091030/src/glx/x11/glx_pbuffer.c.jx mesa-20091030/src/glx/x11/glx_pbuffer.c
+--- mesa-20091030/src/glx/x11/glx_pbuffer.c.jx 2009-10-29 21:12:50.000000000 -0400
++++ mesa-20091030/src/glx/x11/glx_pbuffer.c 2009-11-17 14:56:07.000000000 -0500
+@@ -35,6 +35,8 @@
+ #include <X11/extensions/Xext.h>
+ #include <assert.h>
+ #include <string.h>
++#include <unistd.h>
++#include <limits.h>
+ #include "glapi.h"
+ #include "glxextensions.h"
+ #include "glcontextmodes.h"
+@@ -56,10 +58,13 @@ warn_GLX_1_3(Display *dpy, const char *f
+ __GLXdisplayPrivate *priv = __glXInitialize(dpy);
+
+ if (priv->minorVersion < 3) {
++ char buf[PATH_MAX];
++ if (readlink("/proc/self/exe", buf, PATH_MAX) == -1)
++ buf[0] = '\0';
+ fprintf(stderr,
+- "WARNING: Application calling GLX 1.3 function \"%s\" "
++ "WARNING: Application %s calling GLX 1.3 function \"%s\" "
+ "when GLX 1.3 is not supported! This is an application bug!\n",
+- function_name);
++ buf, function_name);
+ }
+ }
+