mirror of https://gitee.com/openkylin/qemu.git
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
This commit is contained in:
parent
8a0b4de048
commit
ddf31aa853
|
@ -5598,10 +5598,12 @@ static int target_to_host_fcntl_cmd(int cmd)
|
||||||
case TARGET_F_SETOWN_EX:
|
case TARGET_F_SETOWN_EX:
|
||||||
return F_SETOWN_EX;
|
return F_SETOWN_EX;
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef F_SETPIPE_SZ
|
||||||
case TARGET_F_SETPIPE_SZ:
|
case TARGET_F_SETPIPE_SZ:
|
||||||
return F_SETPIPE_SZ;
|
return F_SETPIPE_SZ;
|
||||||
case TARGET_F_GETPIPE_SZ:
|
case TARGET_F_GETPIPE_SZ:
|
||||||
return F_GETPIPE_SZ;
|
return F_GETPIPE_SZ;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
return -TARGET_EINVAL;
|
return -TARGET_EINVAL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue