From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:47579) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIeuX-0004vU-HQ for qemu-devel@nongnu.org; Thu, 30 Jun 2016 12:33:54 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIeuW-0000Y8-JY for qemu-devel@nongnu.org; Thu, 30 Jun 2016 12:33:53 -0400 Received: from orth.archaic.org.uk ([2001:8b0:1d0::2]:58042) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIeuW-0000Xy-Ca for qemu-devel@nongnu.org; Thu, 30 Jun 2016 12:33:52 -0400 From: Peter Maydell Date: Thu, 30 Jun 2016 17:33:49 +0100 Message-Id: <1467304429-21470-1-git-send-email-peter.maydell@linaro.org> Subject: [Qemu-devel] [PATCH] linux-user: Fix compilation when F_SETPIPE_SZ isn't defined List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: patches@linaro.org, Riku Voipio 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 --- 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