[Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev

Mike Frysinger posted 1 patch 7 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20170210061200.15373-1-vapier@gentoo.org
Test checkpatch passed
Test docker failed
Test s390x passed
include/qemu/osdep.h | 4 ++++
1 file changed, 4 insertions(+)
[Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by Mike Frysinger 7 years, 2 months ago
Linux C libs are moving away from implicit header pollution with
sys/types.h

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
---
 include/qemu/osdep.h | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
index 56c9e22405ec..6aaace6cf37f 100644
--- a/include/qemu/osdep.h
+++ b/include/qemu/osdep.h
@@ -85,6 +85,10 @@ extern int daemon(int, int);
 #include <setjmp.h>
 #include <signal.h>
 
+#ifdef __linux__
+#include <sys/sysmacros.h>
+#endif
+
 #ifdef __OpenBSD__
 #include <sys/signal.h>
 #endif
-- 
2.11.0


Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by no-reply@patchew.org 7 years, 2 months ago
Hi,

Your series failed automatic build test. Please find the testing commands and
their output below. If you have docker installed, you can probably reproduce it
locally.

Subject: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Message-id: 20170210061200.15373-1-vapier@gentoo.org
Type: series

=== TEST SCRIPT BEGIN ===
#!/bin/bash
set -e
git submodule update --init dtc
# Let docker tests dump environment info
export SHOW_ENV=1
export J=16
make docker-test-quick@centos6
make docker-test-mingw@fedora
make docker-test-build@min-glib
=== TEST SCRIPT END ===

Updating 3c8cf5a9c21ff8782164d1def7f44bd888713384
Switched to a new branch 'test'
58b4d8e osdep.h: pull in sys/sysmacros.h for major/minor/makedev

=== OUTPUT BEGIN ===
Submodule 'dtc' (git://git.qemu-project.org/dtc.git) registered for path 'dtc'
fatal: read error: Connection reset by peer
Cloning into 'dtc'...
Clone of 'git://git.qemu-project.org/dtc.git' into submodule path 'dtc' failed
=== OUTPUT END ===

Test command exited with code: 1


---
Email generated automatically by Patchew [http://patchew.org/].
Please send your feedback to patchew-devel@freelists.org
Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by Peter Maydell 7 years, 2 months ago
On 10 February 2017 at 06:12, Mike Frysinger <vapier@gentoo.org> wrote:
> Linux C libs are moving away from implicit header pollution with
> sys/types.h
>
> Signed-off-by: Mike Frysinger <vapier@gentoo.org>
> ---
>  include/qemu/osdep.h | 4 ++++
>  1 file changed, 4 insertions(+)
>
> diff --git a/include/qemu/osdep.h b/include/qemu/osdep.h
> index 56c9e22405ec..6aaace6cf37f 100644
> --- a/include/qemu/osdep.h
> +++ b/include/qemu/osdep.h
> @@ -85,6 +85,10 @@ extern int daemon(int, int);
>  #include <setjmp.h>
>  #include <signal.h>
>
> +#ifdef __linux__
> +#include <sys/sysmacros.h>
> +#endif
> +
>  #ifdef __OpenBSD__
>  #include <sys/signal.h>
>  #endif

I think there's already a patch on list for this that
does this (with a proper configure test).

I still think that it's a shame that glibc is breaking
compatibility with where these macros have always been
kept on every OS that's implemented them back to 2BSD...

thanks
-- PMM

Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by Mike Frysinger 7 years, 2 months ago
On 10 Feb 2017 09:04, Peter Maydell wrote:
> I still think that it's a shame that glibc is breaking
> compatibility with where these macros have always been
> kept on every OS that's implemented them back to 2BSD...

i don't think that characterization is accurate.  if it were,
autoconf wouldn't have a AC_HEADER_MAJOR helper.
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Particular-Headers.html#index-AC_005fHEADER_005fMAJOR-616
-mike
Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by Peter Maydell 7 years, 2 months ago
On 15 February 2017 at 03:02, Mike Frysinger <vapier@gentoo.org> wrote:
> On 10 Feb 2017 09:04, Peter Maydell wrote:
>> I still think that it's a shame that glibc is breaking
>> compatibility with where these macros have always been
>> kept on every OS that's implemented them back to 2BSD...
>
> i don't think that characterization is accurate.  if it were,
> autoconf wouldn't have a AC_HEADER_MAJOR helper.

Hmm, Googling suggests that Solaris (and perhaps
other SysV Unixes) put them in mkdev.h.
That doesn't explain why glibc is taking yet a third
approach here rather than using either of the two
previously used choices...

thanks
-- PMM

Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by Eric Blake 7 years, 1 month ago
On 02/15/2017 06:50 AM, Peter Maydell wrote:
> On 15 February 2017 at 03:02, Mike Frysinger <vapier@gentoo.org> wrote:
>> On 10 Feb 2017 09:04, Peter Maydell wrote:
>>> I still think that it's a shame that glibc is breaking
>>> compatibility with where these macros have always been
>>> kept on every OS that's implemented them back to 2BSD...
>>
>> i don't think that characterization is accurate.  if it were,
>> autoconf wouldn't have a AC_HEADER_MAJOR helper.
> 
> Hmm, Googling suggests that Solaris (and perhaps
> other SysV Unixes) put them in mkdev.h.
> That doesn't explain why glibc is taking yet a third
> approach here rather than using either of the two
> previously used choices...

Whether or not you think glibc broke things, the fact remains that the
build is broken on current Fedora rawhide if we don't apply either this
or the other proposed patch (the one by Christopher Covington, which
I've now pinged)

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Re: [Qemu-devel] [PATCH] osdep.h: pull in sys/sysmacros.h for major/minor/makedev
Posted by Peter Maydell 7 years, 1 month ago
On 13 March 2017 at 19:31, Eric Blake <eblake@redhat.com> wrote:
> Whether or not you think glibc broke things, the fact remains that the
> build is broken on current Fedora rawhide if we don't apply either this
> or the other proposed patch (the one by Christopher Covington, which
> I've now pinged)

Yes, I'm not opposed to qemu having a patch to work around this
mess. I'm just irritated that glibc makes it necessary.

thanks
-- PMM