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

Alan Coopersmith alan.coopersmith at oracle.com
Thu Apr 27 19:57:42 UTC 2017


On 04/27/17 12:24 PM, Adam Jackson wrote:
> On Thu, 2017-04-27 at 11:54 -0700, Alan Coopersmith wrote:
>> 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:
>
> Neat! Did not know that. I just copied the existing pattern for
> <sys/mkdev.h> for Solaris, since there was a matching pattern in the
> meson build.

I learned it recently from upstreaming similar patches to gvfs:
https://bugzilla.gnome.org/show_bug.cgi?id=776213

Certainly I can see preferring checks that are implemented in both autoconf
and meson now, instead of having one set of #ifdefs for autoconf and another
for meson.

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


More information about the xorg-devel mailing list