Hi Emil,
Including limits.h does seem like the right way forward. Can you send a git format-patch created fix to the ML [1]?
Output of format-patch is at the end of the email.
I added '#include <limits.h>' right before '#include <dirent.h>' because on Debian 8 (jessie) the file dirent.h includes bits/posix1_lim.h which indirectly includes limits.h. Also bits/posix1_lim.h has the comment - 'Never include this file directly; use <limits.h> instead.'
After the patch I built and run make check; make distcheck on Debian - no errors.
Additionally you should have noticed a bunch of warnings (missing implementation of XXX) on non-linux platforms. If you'd like to solve these but you're unsure what exactly the functions are supposed to do, let me know and I can help out. You can also catch me at #dri-devel (freenode), look for xexaxo.
Thanks! Yes I'd like and will try to solve these 'missing implementation', I'll ask you if I have questions.
----------------------- Output of format-patch --------------
From 0b491abb893d0faf1a9fe0e3052255bf5ad72592 Mon Sep 17 00:00:00 2001
From: Evgeny Litvinenko evgeny.v.litvinenko@gmail.com Date: Sat, 26 Sep 2015 22:58:15 +0300 Subject: [PATCH] [Bug 92082] Solaris fix: 'PATH_MAX' undeclared
--- xf86drm.c | 1 + 1 file changed, 1 insertion(+)
diff --git a/xf86drm.c b/xf86drm.c index a9f5c29..54b808b 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -41,6 +41,7 @@ #include <string.h> #include <strings.h> #include <ctype.h> +#include <limits.h> #include <dirent.h> #include <stddef.h> #include <fcntl.h>