On Monday, March 20, 2017 9:23:55 PM PDT Jonathan Gray wrote:
> On Mon, Mar 20, 2017 at 04:05:04PM -0700, Kenneth Graunke wrote:
> > Recent glibc generates this warning:
> > 
> > brw_performance_query.c:1648:13: warning: In the GNU C Library, "minor" is 
> > defined
> >  by <sys/sysmacros.h>. For historical compatibility, it is
> >  currently defined by <sys/types.h> as well, but we plan to
> >  remove this soon. To use "minor", include <sys/sysmacros.h>
> >  directly. If you did not intend to use a system-defined macro
> >  "minor", you should undefine it after including <sys/types.h>.
> > 
> >     min = minor(sb.st_rdev);
> > 
> > So, include sys/sysmacros.h to shut up the warning.
> 
> This header is only present on glibc so it should be gated by an ifdef
> or it will break all other systems.
> 
> minor()/major() are documented as needing sys/types.h and there is no
> sys/sysmacro.h on OpenBSD for instance.

Gah, thanks...I did a search for sysmacros.h and found some results that
I thought meant that FreeBSD had it.  But, it was actually compatibility
headers for some project trying to build on *BSD...without this.

Will send a v2.

Attachment: signature.asc
Description: This is a digitally signed message part.

_______________________________________________
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to