Signed-off-by: Christopher James Halse Rogers <christopher.halse.rog...@canonical.com> --- glx/glxdricommon.c | 13 ++++++++++++- 1 files changed, 12 insertions(+), 1 deletions(-)
diff --git a/glx/glxdricommon.c b/glx/glxdricommon.c index 5569ab7..f9f7f5b 100644 --- a/glx/glxdricommon.c +++ b/glx/glxdricommon.c @@ -40,6 +40,17 @@ #include "glxscreens.h" #include "glxdricommon.h" +#ifndef PATH_MAX +#include <sys/param.h> +#ifndef PATH_MAX +#ifdef MAXPATHLEN +#define PATH_MAX MAXPATHLEN +#else +#define PATH_MAX 1024 +#endif +#endif +#endif + static int getUST(int64_t *ust) { @@ -215,7 +226,7 @@ glxProbeDriver(const char *driverName, { int i; void *driver; - char filename[128]; + char filename[PATH_MAX]; const __DRIextension **extensions; snprintf(filename, sizeof filename, "%s/%s_dri.so", -- 1.7.4.1 _______________________________________________ xorg-devel@lists.x.org: X.Org development Archives: http://lists.x.org/archives/xorg-devel Info: http://lists.x.org/mailman/listinfo/xorg-devel