]> git.proxmox.com Git - qemu.git/commit
osdep: Fix runtime failure on older Linux kernels
authorAndre Przywara <andre.przywara@amd.com>
Fri, 18 Dec 2009 09:45:07 +0000 (10:45 +0100)
committerAurelien Jarno <aurelien@aurel32.net>
Fri, 18 Dec 2009 15:30:45 +0000 (16:30 +0100)
commit97d949d9da12311aaf683d4bd1cf2504a966c73d
treeb86786f69320b19ed834d31487ec92121f59b3e0
parent040093b1a5b7d7a32b0d40447590b8c7b89c3280
osdep: Fix runtime failure on older Linux kernels

If QEMU finds newer kernel header files on compilation time, it will use
advertised features like pipe2 or SOCK_CLOEXEC by just doing a compile test.
If later the executables are executed on an older kernel (<2.6.27,
like Xen Dom0 2.6.18), then QEMU will fail on opening sockets and creating
pipes and returns the rather unspecific "qemu_init_main_loop failed".
This patch fixes this by checking the return values of these calls
for EINVAL and ENOSYS and falling back to the older versions automatically.

Signed-off-by: Andre Przywara <andre.przywara@amd.com>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
osdep.c