Hi Eric, On 12/28/2016 11:10 AM, Eric Blake wrote: > On 12/28/2016 08:53 AM, Christopher Covington wrote: >> The definition of the major() and minor() macros are moving within glibc to >> <sys/sysmacros.h>. Include this header to avoid the following sorts of >> build-stopping messages: >> > >> The additional include allows the build to complete on Fedora 26 (Rawhide) >> with glibc version 2.24.90. >> >> Signed-off-by: Christopher Covington <c...@codeaurora.org> >> --- >> include/sysemu/os-posix.h | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/include/sysemu/os-posix.h b/include/sysemu/os-posix.h >> index b0a6c0695b..772d58f7ed 100644 >> --- a/include/sysemu/os-posix.h >> +++ b/include/sysemu/os-posix.h >> @@ -28,6 +28,7 @@ >> >> #include <sys/mman.h> >> #include <sys/socket.h> >> +#include <sys/sysmacros.h> > > I repeat what I said on v1: > > Works for glibc; but <sys/sysmacros.h> is non-standard and not present > on some other systems, so this may fail to build elsewhere.
I read your response to v1 but got stuck on this "some other systems" statement which seems too vague for me to act on. I see the following operating systems checked in configure: Cygwin, mingw32, GNU/kFreeBSD, FreeBSD, DragonFly, NetBSD, OpenBSD, Darwin, SunOS, AIX, Haiku, and Linux. But I'm really not sure what list of C libraries and corresponding mkdev.h versus sysmacros.h versus types.h usage this translates to. > You'll probably need a configure probe. I'm testing that now and will hopefully send it out as v3 shortly. > Autoconf also says that some platforms have <sys/mkdev.h> instead of > <sys/sysmacros.h> (per its AC_HEADER_MAJOR macro). `git grep mkdev` returns no results for me so I conclude that no currently supported OS/libc requires it. In case anyone wants to work around these messages, I'd like to highlight the --disable-werror option to ./configure. If I had known about it this morning, I probably would be happily authoring other changes right now. Thanks, Cov -- Qualcomm Datacenter Technologies, Inc. as an affiliate of Qualcomm Technologies, Inc. Qualcomm Technologies, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project.