OSDN Git Service

meson: fix sys/mkdev.h detection on Solaris
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 14 Sep 2019 21:22:03 +0000 (22:22 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Sat, 14 Sep 2019 21:22:03 +0000 (22:22 +0100)
commit827a2a2042359ac93a9b082ee9584b43baa1a3f7
treebe86bbd5a423b629bdd4a45ade0336608d000af3
parent10cd9c3da848e131db0eb8e1f9cf88fe4d85e703
meson: fix sys/mkdev.h detection on Solaris

On Solaris, sys/sysmacros.h has long-deprecated copies of major() & minor()
but not makedev().
sys/mkdev.h has all three and is the preferred choice.

Let's make sure we check for all 3 major(), minor() and makedev().

Fixes build failure with error:
../xf86drm.c: In function ‘drmOpenMinor’:
../xf86drm.c:454:30: error: implicit declaration of function ‘makedev’ [-Werror=implicit-function-declaration]
  454 |         return drmOpenDevice(makedev(DRM_MAJOR, minor), minor, type);
      |                              ^~~~~~~

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Alan Coopersmith <alan.coopersmith@oracle.com>
Tested-by: Alan Coopersmith <alan.coopersmith@oracle.com>
meson.build