mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 05:10:11 +01:00
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(). Reported-by: Alan Coopersmith <alan.coopersmith@oracle.com> 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>
This commit is contained in:
parent
02b3aa3cf3
commit
6f26eae077
1 changed files with 7 additions and 2 deletions
|
|
@ -1052,9 +1052,14 @@ elif host_machine.cpu_family().startswith('ppc64') and host_machine.endian() ==
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Check for standard headers and functions
|
# Check for standard headers and functions
|
||||||
if cc.has_header_symbol('sys/sysmacros.h', 'major')
|
if (cc.has_header_symbol('sys/sysmacros.h', 'major') and
|
||||||
|
cc.has_header_symbol('sys/sysmacros.h', 'minor') and
|
||||||
|
cc.has_header_symbol('sys/sysmacros.h', 'makedev'))
|
||||||
pre_args += '-DMAJOR_IN_SYSMACROS'
|
pre_args += '-DMAJOR_IN_SYSMACROS'
|
||||||
elif cc.has_header_symbol('sys/mkdev.h', 'major')
|
endif
|
||||||
|
if (cc.has_header_symbol('sys/mkdev.h', 'major') and
|
||||||
|
cc.has_header_symbol('sys/mkdev.h', 'minor') and
|
||||||
|
cc.has_header_symbol('sys/mkdev.h', 'makedev'))
|
||||||
pre_args += '-DMAJOR_IN_MKDEV'
|
pre_args += '-DMAJOR_IN_MKDEV'
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue