Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Xen: Devel

[PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems

 

 

Xen devel RSS feed   Index | Next | Previous | View Threaded


roger.pau at citrix

May 30, 2012, 9:12 AM

Post #1 of 7 (147 views)
Permalink
[PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems

BSD systems already have a sys/queue.h file, which has more macros
than the one Qemu uses, and some header files depend on having that
macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
systems and include the native one.

This is not a backport because the original patch is too dificult to
backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.

Cc: Stefano Stabellini <stefano.stabellini [at] eu>
Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
---
sys-queue.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sys-queue.h b/sys-queue.h
index cb6a4c8..55c26fe 100644
--- a/sys-queue.h
+++ b/sys-queue.h
@@ -36,6 +36,12 @@
* @(#)queue.h 8.5 (Berkeley) 8/20/94
*/

+#include "config-host.h"
+#ifdef _BSD
+/* include native header before sys-queue.h */
+#include <sys/queue.h>
+#endif
+
#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_

--
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


stefano.stabellini at eu

May 31, 2012, 6:59 AM

Post #2 of 7 (143 views)
Permalink
Re: [PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems [In reply to]

On Wed, 30 May 2012, Roger Pau Monne wrote:
> BSD systems already have a sys/queue.h file, which has more macros
> than the one Qemu uses, and some header files depend on having that
> macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
> systems and include the native one.
>
> This is not a backport because the original patch is too dificult to
> backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.

The upstream commit message states:

"Problem: Our file sys-queue.h is a copy of the BSD file, but there are
some additions and it's not entirely compatible. Because of that, there
have been conflicts with system headers on BSD systems."

Wouldn't this be a problem if we apply the simple patch below?


> Cc: Stefano Stabellini <stefano.stabellini [at] eu>
> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
> ---
> sys-queue.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/sys-queue.h b/sys-queue.h
> index cb6a4c8..55c26fe 100644
> --- a/sys-queue.h
> +++ b/sys-queue.h
> @@ -36,6 +36,12 @@
> * @(#)queue.h 8.5 (Berkeley) 8/20/94
> */
>
> +#include "config-host.h"
> +#ifdef _BSD
> +/* include native header before sys-queue.h */
> +#include <sys/queue.h>
> +#endif
> +
> #ifndef _SYS_QUEUE_H_
> #define _SYS_QUEUE_H_
>
> --
> 1.7.7.5 (Apple Git-26)
>

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


roger.pau at citrix

May 31, 2012, 7:13 AM

Post #3 of 7 (142 views)
Permalink
Re: [PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems [In reply to]

Stefano Stabellini wrote:
> On Wed, 30 May 2012, Roger Pau Monne wrote:
>> BSD systems already have a sys/queue.h file, which has more macros
>> than the one Qemu uses, and some header files depend on having that
>> macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
>> systems and include the native one.
>>
>> This is not a backport because the original patch is too dificult to
>> backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.
>
> The upstream commit message states:
>
> "Problem: Our file sys-queue.h is a copy of the BSD file, but there are
> some additions and it's not entirely compatible. Because of that, there
> have been conflicts with system headers on BSD systems."
>
> Wouldn't this be a problem if we apply the simple patch below?

Doing a diff -bB shows that the Qemu version is just a stripped version
of the original NetBSD header, with many macros removed, but no new ones
added, so I think the patch is safe.


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


stefano.stabellini at eu

May 31, 2012, 7:16 AM

Post #4 of 7 (142 views)
Permalink
Re: [PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems [In reply to]

On Thu, 31 May 2012, Roger Pau Monne wrote:
> Stefano Stabellini wrote:
> > On Wed, 30 May 2012, Roger Pau Monne wrote:
> >> BSD systems already have a sys/queue.h file, which has more macros
> >> than the one Qemu uses, and some header files depend on having that
> >> macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
> >> systems and include the native one.
> >>
> >> This is not a backport because the original patch is too dificult to
> >> backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.
> >
> > The upstream commit message states:
> >
> > "Problem: Our file sys-queue.h is a copy of the BSD file, but there are
> > some additions and it's not entirely compatible. Because of that, there
> > have been conflicts with system headers on BSD systems."
> >
> > Wouldn't this be a problem if we apply the simple patch below?
>
> Doing a diff -bB shows that the Qemu version is just a stripped version
> of the original NetBSD header, with many macros removed, but no new ones
> added, so I think the patch is safe.

OK. Please add says this in the commit message.

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


roger.pau at citrix

Jun 1, 2012, 3:57 AM

Post #5 of 7 (145 views)
Permalink
[PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems [In reply to]

BSD systems already have a sys/queue.h file, which has more macros
than the one Qemu uses, and some header files depend on having that
macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
systems and include the native one.

This is not a backport because the original patch is too dificult to
backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.

Doing a diff -bB shows that the Qemu version is just a stripped
version of the original NetBSD header, with many macros removed, but
no new ones added.

Cc: Stefano Stabellini <stefano.stabellini [at] eu>
Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
---
sys-queue.h | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/sys-queue.h b/sys-queue.h
index cb6a4c8..55c26fe 100644
--- a/sys-queue.h
+++ b/sys-queue.h
@@ -36,6 +36,12 @@
* @(#)queue.h 8.5 (Berkeley) 8/20/94
*/

+#include "config-host.h"
+#ifdef _BSD
+/* include native header before sys-queue.h */
+#include <sys/queue.h>
+#endif
+
#ifndef _SYS_QUEUE_H_
#define _SYS_QUEUE_H_

--
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


stefano.stabellini at eu

Jun 1, 2012, 3:59 AM

Post #6 of 7 (141 views)
Permalink
Re: [PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems [In reply to]

On Fri, 1 Jun 2012, Roger Pau Monne wrote:
> BSD systems already have a sys/queue.h file, which has more macros
> than the one Qemu uses, and some header files depend on having that
> macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
> systems and include the native one.
>
> This is not a backport because the original patch is too dificult to
> backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.
>
> Doing a diff -bB shows that the Qemu version is just a stripped
> version of the original NetBSD header, with many macros removed, but
> no new ones added.
>
> Cc: Stefano Stabellini <stefano.stabellini [at] eu>
> Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>

Acked-by: Stefano Stabellini <stefano.stabellini [at] eu>


> sys-queue.h | 6 ++++++
> 1 files changed, 6 insertions(+), 0 deletions(-)
>
> diff --git a/sys-queue.h b/sys-queue.h
> index cb6a4c8..55c26fe 100644
> --- a/sys-queue.h
> +++ b/sys-queue.h
> @@ -36,6 +36,12 @@
> * @(#)queue.h 8.5 (Berkeley) 8/20/94
> */
>
> +#include "config-host.h"
> +#ifdef _BSD
> +/* include native header before sys-queue.h */
> +#include <sys/queue.h>
> +#endif
> +
> #ifndef _SYS_QUEUE_H_
> #define _SYS_QUEUE_H_
>
> --
> 1.7.7.5 (Apple Git-26)
>

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel


Ian.Jackson at eu

Jun 7, 2012, 11:46 AM

Post #7 of 7 (134 views)
Permalink
Re: [PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems [In reply to]

Stefano Stabellini writes ("Re: [Xen-devel] [PATCH] qemu-xen-trad: fix sys-queue.h usage on BSD systems"):
> On Fri, 1 Jun 2012, Roger Pau Monne wrote:
> > BSD systems already have a sys/queue.h file, which has more macros
> > than the one Qemu uses, and some header files depend on having that
> > macros defined (sys/disk.h for example). Disable sys-queue.h on BSD
> > systems and include the native one.
> >
> > This is not a backport because the original patch is too dificult to
> > backport, it's commit 72cf2d4f0e181d0d3a3122e04129c58a95da713e.
> >
> > Doing a diff -bB shows that the Qemu version is just a stripped
> > version of the original NetBSD header, with many macros removed, but
> > no new ones added.
> >
> > Cc: Stefano Stabellini <stefano.stabellini [at] eu>
> > Signed-off-by: Roger Pau Monne <roger.pau [at] citrix>
>
> Acked-by: Stefano Stabellini <stefano.stabellini [at] eu>

Committed-by: Ian Jackson <ian.jackson [at] eu>

_______________________________________________
Xen-devel mailing list
Xen-devel [at] lists
http://lists.xen.org/xen-devel

Xen devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.