qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] linux-user F_DUPFD_CLOEXEC fix
@ 2009-09-09 16:06 Vince Weaver
  2009-09-09 18:16 ` malc
  0 siblings, 1 reply; 2+ messages in thread
From: Vince Weaver @ 2009-09-09 16:06 UTC (permalink / raw)
  To: qemu-devel

Hello

on older machines, the F_DUPFD_CLOEXEC define is not available.  So 
linux-user targets fail to compile.

This fix simply disables the feature if it's not available.

Vince

Signed-off-by: Vince Weaver <vince@csl.cornell.edu>

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 25b95ea..6fdb9f1 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -3685,8 +3685,10 @@ static int target_to_host_fcntl_cmd(int cmd)
             return F_SETLEASE;
         case TARGET_F_GETLEASE:
             return F_GETLEASE;
+#ifdef F_DUPFD_CLOEXEC       
         case TARGET_F_DUPFD_CLOEXEC:
             return F_DUPFD_CLOEXEC;
+#endif       
         case TARGET_F_NOTIFY:
             return F_NOTIFY;
 	default:

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

* Re: [Qemu-devel] [PATCH] linux-user F_DUPFD_CLOEXEC fix
  2009-09-09 16:06 [Qemu-devel] [PATCH] linux-user F_DUPFD_CLOEXEC fix Vince Weaver
@ 2009-09-09 18:16 ` malc
  0 siblings, 0 replies; 2+ messages in thread
From: malc @ 2009-09-09 18:16 UTC (permalink / raw)
  To: Vince Weaver; +Cc: qemu-devel

On Wed, 9 Sep 2009, Vince Weaver wrote:

> Hello
> 
> on older machines, the F_DUPFD_CLOEXEC define is not available.  So 
> linux-user targets fail to compile.
> 
> This fix simply disables the feature if it's not available.

Seconded.

> 
> Vince
> 
> Signed-off-by: Vince Weaver <vince@csl.cornell.edu>
> 
> diff --git a/linux-user/syscall.c b/linux-user/syscall.c
> index 25b95ea..6fdb9f1 100644
> --- a/linux-user/syscall.c
> +++ b/linux-user/syscall.c
> @@ -3685,8 +3685,10 @@ static int target_to_host_fcntl_cmd(int cmd)
>              return F_SETLEASE;
>          case TARGET_F_GETLEASE:
>              return F_GETLEASE;
> +#ifdef F_DUPFD_CLOEXEC       
>          case TARGET_F_DUPFD_CLOEXEC:
>              return F_DUPFD_CLOEXEC;
> +#endif       
>          case TARGET_F_NOTIFY:
>              return F_NOTIFY;
>  	default:
> 
> 

-- 
mailto:av1474@comtv.ru

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

end of thread, other threads:[~2009-09-09 18:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-09 16:06 [Qemu-devel] [PATCH] linux-user F_DUPFD_CLOEXEC fix Vince Weaver
2009-09-09 18:16 ` malc

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).