All of lore.kernel.org
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] qemu-common: Add definition for O_NONBLOCK
@ 2012-11-17 16:40 Stefan Weil
  2012-11-18  8:55 ` Paolo Bonzini
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2012-11-17 16:40 UTC (permalink / raw)
  To: qemu-trivial, Anthony Liguori; +Cc: Stefan Weil, qemu-devel

backends/rng-random.c which was added by commit
5c74521d249486fa3e749dbbf6d56a70d4d7235f needs
macro O_NONBLOCK.

The macro O_NONBLOCK is not defined for all hosts.
Adding a default definition fixes builds for MinGW.

Signed-off-by: Stefan Weil <sw@weilnetz.de>
---

This is a build fix. Therefore I'd appreciate if it could be
committed soon.

Thanks
Stefan W.

 qemu-common.h |    3 +++
 1 file changed, 3 insertions(+)

diff --git a/qemu-common.h b/qemu-common.h
index ac9985c..3a5616c 100644
--- a/qemu-common.h
+++ b/qemu-common.h
@@ -55,6 +55,9 @@ typedef struct MigrationParams MigrationParams;
 #ifndef O_BINARY
 #define O_BINARY 0
 #endif
+#ifndef O_NONBLOCK
+#define O_NONBLOCK 0
+#endif
 #ifndef MAP_ANONYMOUS
 #define MAP_ANONYMOUS MAP_ANON
 #endif
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-common: Add definition for O_NONBLOCK
  2012-11-17 16:40 [Qemu-devel] [PATCH] qemu-common: Add definition for O_NONBLOCK Stefan Weil
@ 2012-11-18  8:55 ` Paolo Bonzini
  2012-11-18 10:41   ` Stefan Weil
  0 siblings, 1 reply; 4+ messages in thread
From: Paolo Bonzini @ 2012-11-18  8:55 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, Anthony Liguori, qemu-devel

Il 17/11/2012 17:40, Stefan Weil ha scritto:
> backends/rng-random.c which was added by commit
> 5c74521d249486fa3e749dbbf6d56a70d4d7235f needs
> macro O_NONBLOCK.
> 
> The macro O_NONBLOCK is not defined for all hosts.
> Adding a default definition fixes builds for MinGW.
> 
> Signed-off-by: Stefan Weil <sw@weilnetz.de>
> ---
> 
> This is a build fix. Therefore I'd appreciate if it could be
> committed soon.

This would make things blocking when they were supposed to be
nonblocking, so I'd prefer not including it.  I thought Anthony had a
fix too?

Paolo

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [PATCH] qemu-common: Add definition for O_NONBLOCK
  2012-11-18  8:55 ` Paolo Bonzini
@ 2012-11-18 10:41   ` Stefan Weil
  2012-12-03 12:52     ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi
  0 siblings, 1 reply; 4+ messages in thread
From: Stefan Weil @ 2012-11-18 10:41 UTC (permalink / raw)
  To: Paolo Bonzini; +Cc: qemu-trivial, Anthony Liguori, qemu-devel

Am 18.11.2012 09:55, schrieb Paolo Bonzini:
> Il 17/11/2012 17:40, Stefan Weil ha scritto:
>> backends/rng-random.c which was added by commit
>> 5c74521d249486fa3e749dbbf6d56a70d4d7235f needs
>> macro O_NONBLOCK.
>>
>> The macro O_NONBLOCK is not defined for all hosts.
>> Adding a default definition fixes builds for MinGW.
>>
>> Signed-off-by: Stefan Weil<sw@weilnetz.de>
>> ---
>>
>> This is a build fix. Therefore I'd appreciate if it could be
>> committed soon.
>
> This would make things blocking when they were supposed to be
> nonblocking, so I'd prefer not including it.  I thought Anthony had a
> fix too?
>
> Paolo

Yes, my patch is only a quick fix to enable builds with MinGW again.

Anthony's patch solves the same problem by omitting the code in
comiplations for non-POSIX builds.

My primary goal was fixing the build, so any of these two patches
is fine for me.

A backends/rng-random.c which compiles with MinGW would be even better,
but maybe that needs a little more time. /dev/random is available with
MinGW, so there is no basic problem doing this.

Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Qemu-devel] [Qemu-trivial] [PATCH] qemu-common: Add definition for O_NONBLOCK
  2012-11-18 10:41   ` Stefan Weil
@ 2012-12-03 12:52     ` Stefan Hajnoczi
  0 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2012-12-03 12:52 UTC (permalink / raw)
  To: Stefan Weil; +Cc: qemu-trivial, Paolo Bonzini, Anthony Liguori, qemu-devel

On Sun, Nov 18, 2012 at 11:41:20AM +0100, Stefan Weil wrote:
> Am 18.11.2012 09:55, schrieb Paolo Bonzini:
> >Il 17/11/2012 17:40, Stefan Weil ha scritto:
> >>backends/rng-random.c which was added by commit
> >>5c74521d249486fa3e749dbbf6d56a70d4d7235f needs
> >>macro O_NONBLOCK.
> >>
> >>The macro O_NONBLOCK is not defined for all hosts.
> >>Adding a default definition fixes builds for MinGW.
> >>
> >>Signed-off-by: Stefan Weil<sw@weilnetz.de>
> >>---
> >>
> >>This is a build fix. Therefore I'd appreciate if it could be
> >>committed soon.
> >
> >This would make things blocking when they were supposed to be
> >nonblocking, so I'd prefer not including it.  I thought Anthony had a
> >fix too?
> >
> >Paolo
> 
> Yes, my patch is only a quick fix to enable builds with MinGW again.
> 
> Anthony's patch solves the same problem by omitting the code in
> comiplations for non-POSIX builds.
> 
> My primary goal was fixing the build, so any of these two patches
> is fine for me.
> 
> A backends/rng-random.c which compiles with MinGW would be even better,
> but maybe that needs a little more time. /dev/random is available with
> MinGW, so there is no basic problem doing this.

Anthony's rng POSIX build patch was merged, dropping this.

Stefan

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2012-12-03 12:52 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-17 16:40 [Qemu-devel] [PATCH] qemu-common: Add definition for O_NONBLOCK Stefan Weil
2012-11-18  8:55 ` Paolo Bonzini
2012-11-18 10:41   ` Stefan Weil
2012-12-03 12:52     ` [Qemu-devel] [Qemu-trivial] " Stefan Hajnoczi

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.