diff options
author | 2009-12-20 12:22:03 +0200 | |
---|---|---|
committer | 2009-12-20 12:22:03 +0200 | |
commit | 5d594a6c22d4ecbcc8ebdaf3b537173116663c19 (patch) | |
tree | 9d428505772eb0046127669ed249e0c7ec3a30d9 /osdep.c | |
parent | Remove pcbios subdirectory (diff) | |
parent | Revert "pci: interrupt disable bit support" (diff) | |
download | qemu-kvm-5d594a6c22d4ecbcc8ebdaf3b537173116663c19.tar.gz qemu-kvm-5d594a6c22d4ecbcc8ebdaf3b537173116663c19.tar.bz2 qemu-kvm-5d594a6c22d4ecbcc8ebdaf3b537173116663c19.zip |
Merge commit '686a3c3dc235df2492e754423799d1abe4f6d9e2' into stable-0.12-merge
* commit '686a3c3dc235df2492e754423799d1abe4f6d9e2':
Revert "pci: interrupt disable bit support"
target-ppc: fix ppc32 kvm build
S390: Bail out without KVM
S390: Don't tell guest we're updating config space
add default virtcon initialization
S390: Loop through virtio console devices
target-s390: Fail on unknown instructions
osdep: Fix runtime failure on older Linux kernels
Fix a make -j race
target-alpha: Fix generic ctz64.
s390: Fix buggy assignment
target-mips: fix user-mode emulation startup
Conflicts:
hw/pci.c
Signed-off-by: Avi Kivity <avi@redhat.com>
Diffstat (limited to 'osdep.c')
-rw-r--r-- | osdep.c | 18 |
1 files changed, 12 insertions, 6 deletions
@@ -266,13 +266,15 @@ int qemu_pipe(int pipefd[2]) #ifdef CONFIG_PIPE2 ret = pipe2(pipefd, O_CLOEXEC); -#else + if (ret != -1 || errno != ENOSYS) { + return ret; + } +#endif ret = pipe(pipefd); if (ret == 0) { qemu_set_cloexec(pipefd[0]); qemu_set_cloexec(pipefd[1]); } -#endif return ret; } @@ -287,12 +289,14 @@ int qemu_socket(int domain, int type, int protocol) #ifdef SOCK_CLOEXEC ret = socket(domain, type | SOCK_CLOEXEC, protocol); -#else + if (ret != -1 || errno != EINVAL) { + return ret; + } +#endif ret = socket(domain, type, protocol); if (ret >= 0) { qemu_set_cloexec(ret); } -#endif return ret; } @@ -306,12 +310,14 @@ int qemu_accept(int s, struct sockaddr *addr, socklen_t *addrlen) #ifdef CONFIG_ACCEPT4 ret = accept4(s, addr, addrlen, SOCK_CLOEXEC); -#else + if (ret != -1 || errno != EINVAL) { + return ret; + } +#endif ret = accept(s, addr, addrlen); if (ret >= 0) { qemu_set_cloexec(ret); } -#endif return ret; } |