Message ID | 1425757832-7163-1-git-send-email-alan.coopersmith@oracle.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On 7 March 2015 at 19:50, Alan Coopersmith <alan.coopersmith@oracle.com> wrote: > Needed for the definitions of major() & minor() used in > drmGetNodeTypeFromFd() and makedev() used in drmOpenMinor() > On my linux box they are declared in #include <sys/types.h>, behind a _BSD_SOURCE guard. That aside, patch looks great. Thanks. Reviewed-by: Emil Velikov <emil.l.velikov@gmail.com> -Emil
diff --git a/configure.ac b/configure.ac index 8afee83..bd39aa0 100644 --- a/configure.ac +++ b/configure.ac @@ -42,6 +42,8 @@ AC_USE_SYSTEM_EXTENSIONS AC_SYS_LARGEFILE AC_FUNC_ALLOCA +AC_CHECK_HEADERS([sys/mkdev.h]) + # Initialize libtool LT_PREREQ([2.2]) LT_INIT([disable-static]) diff --git a/xf86drm.c b/xf86drm.c index e117bc6..c901f8b 100644 --- a/xf86drm.c +++ b/xf86drm.c @@ -50,6 +50,9 @@ #include <sys/ioctl.h> #include <sys/time.h> #include <stdarg.h> +#ifdef HAVE_SYS_MKDEV_H +# include <sys/mkdev.h> /* defines major(), minor(), and makedev() on Solaris */ +#endif /* Not all systems have MAP_FAILED defined */ #ifndef MAP_FAILED
Needed for the definitions of major() & minor() used in drmGetNodeTypeFromFd() and makedev() used in drmOpenMinor() Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> --- configure.ac | 2 ++ xf86drm.c | 3 +++ 2 files changed, 5 insertions(+)