#ifdef HAVE_SYS_MKDEV_H
#include <sys/mkdev.h>
#endif
#include <sys/sysmacros.h>
#include "libdrm_macros.h"
#include "internal.h"
# include <sys/mkdev.h> /* defines major(), minor(), and makedev() on Solaris */
#include <math.h>
/* Not all systems have MAP_FAILED defined */
#ifndef MAP_FAILED