Bug 92082 - Build on Solaris: xf86drm.c:3021: error: 'PATH_MAX' undeclared (first use in this function)
Summary: Build on Solaris: xf86drm.c:3021: error: 'PATH_MAX' undeclared (first use in ...
Status: RESOLVED FIXED
Alias: None
Product: DRI
Classification: Unclassified
Component: libdrm (show other bugs)
Version: DRI git
Hardware: x86-64 (AMD64) Solaris
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-22 22:31 UTC by evgeny
Modified: 2015-09-28 16:56 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description evgeny 2015-09-22 22:31:23 UTC
commit 291b2bb92c5fc90101417b80bbdc6c994be5fff2 (xf86drm: move ifdef __linux__ guards where needed)
introduces the following error when build on illumos (OpenIndiana):

xf86drm.c: In function 'drmGetDevices':
xf86drm.c:3021: error: 'PATH_MAX' undeclared (first use in this function)
xf86drm.c:3021: error: (Each undeclared identifier is reported only once
xf86drm.c:3021: error: for each function it appears in.)

OpenIndiana has the line
#define PATH_MAX        1024    /* max # of characters in a path name */
in /usr/include/limits.h

May be xf86drm.c should #include limits.h?
Comment 1 Emil Velikov 2015-09-24 12:11:07 UTC
Hi Evgeny,

Including limits.h does seem like the right way forward. Can you send a git format-patch created fix to the ML [1]?


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

[1] http://lists.freedesktop.org/mailman/listinfo/dri-devel
Comment 2 Bernd Kuhls 2015-09-27 17:26:21 UTC
Using a musl toolchain this bug triggers as well and is fixed by
http://lists.freedesktop.org/archives/dri-devel/2015-September/091104.html
Comment 3 Emil Velikov 2015-09-28 16:56:20 UTC
Should be fixed in master. Thanks for the report.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.