qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Peter Maydell <peter.maydell@linaro.org>
To: qemu-devel@nongnu.org
Cc: patches@linaro.org, Riku Voipio <riku.voipio@iki.fi>
Subject: [Qemu-devel] [PATCH] linux-user: Fix compilation when F_SETPIPE_SZ isn't defined
Date: Thu, 30 Jun 2016 17:33:49 +0100	[thread overview]
Message-ID: <1467304429-21470-1-git-send-email-peter.maydell@linaro.org> (raw)

Older kernels don't have F_SETPIPE_SZ and F_GETPIPE_SZ (in
particular RHEL6's system headers don't define these). Add
ifdefs so that we can gracefully fall back to not supporting
those guest ioctls rather than failing to build.

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
---
Reported by an anonymous IRC user...

 linux-user/syscall.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 6ad8239..165fd06 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -5598,10 +5598,12 @@ static int target_to_host_fcntl_cmd(int cmd)
 	case TARGET_F_SETOWN_EX:
 	    return F_SETOWN_EX;
 #endif
+#ifdef F_SETPIPE_SZ
         case TARGET_F_SETPIPE_SZ:
             return F_SETPIPE_SZ;
         case TARGET_F_GETPIPE_SZ:
             return F_GETPIPE_SZ;
+#endif
 	default:
             return -TARGET_EINVAL;
     }
-- 
1.9.1

             reply	other threads:[~2016-06-30 16:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-30 16:33 Peter Maydell [this message]
2016-06-30 17:51 ` [Qemu-devel] [PATCH] linux-user: Fix compilation when F_SETPIPE_SZ isn't defined Laurent Vivier
2016-07-01 10:17   ` Peter Maydell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1467304429-21470-1-git-send-email-peter.maydell@linaro.org \
    --to=peter.maydell@linaro.org \
    --cc=patches@linaro.org \
    --cc=qemu-devel@nongnu.org \
    --cc=riku.voipio@iki.fi \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).