aboutsummaryrefslogtreecommitdiff
path: root/linux-user/syscall.c
diff options
context:
space:
mode:
authorPeter Maydell <peter.maydell@linaro.org>2016-06-30 17:33:49 +0100
committerPeter Maydell <peter.maydell@linaro.org>2016-06-30 19:27:51 +0100
commitddf31aa853a32925f8141dbcb66fdc84f999ece1 (patch)
tree207b025874af090ca3083d7f1aa9b711574b7917 /linux-user/syscall.c
parent8a0b4de048e20215415b24c7b42514c27b9d6ef3 (diff)
linux-user: Fix compilation when F_SETPIPE_SZ isn't defined
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> Reviewed-by: Laurent Vivier <laurent@vivier.eu> Message-id: 1467304429-21470-1-git-send-email-peter.maydell@linaro.org
Diffstat (limited to 'linux-user/syscall.c')
-rw-r--r--linux-user/syscall.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 28ee45a937..8bf6205dc2 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;
}