[PATCH xserver 2/2] xfree86: Silence a new glibc warning

Alan Coopersmith alan.coopersmith at oracle.com
Thu Apr 27 18:54:02 UTC 2017


On 04/27/17 11:45 AM, Adam Jackson wrote:
> glibc would like to stop declaring major()/minor() macros in
> <sys/types.h> because that header gets included absolutely everywhere
> and unix device major/minor is perhaps usually not what's expected. Fair
> enough. If one includes <sys/sysmacros.h> as well then glibc knows we
> meant it and doesn't warn, so do that if it exists.

While this works, autoconf also provides AC_HEADER_MAJOR to figure out
which header to use:

https://www.gnu.org/savannah-checkouts/gnu/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html#AC_005fHEADER_005fMAJOR

Up to you - I don't know of anything that breaks by including too many
headers here.

-- 
	-Alan Coopersmith-              alan.coopersmith at oracle.com
	 Oracle Solaris Engineering - http://blogs.oracle.com/alanc


More information about the xorg-devel mailing list