diff options
author | Avi Kivity <avi@redhat.com> | 2009-12-20 16:55:49 +0200 |
---|---|---|
committer | Avi Kivity <avi@redhat.com> | 2009-12-20 16:55:49 +0200 |
commit | bfa5727e9ea7bcdf9de02aa4c5b985e31e81c632 (patch) | |
tree | 886fc53bf6cd6dc64bb5fc69889eb3282cea7a22 /osdep.c | |
parent | 5cd96f99910b2884682f7f8f27ae2f8b44ee00c1 (diff) | |
parent | d587e0787153f0224a6140c5015609963ceaabfb (diff) |
Merge commit 'd587e0787153f0224a6140c5015609963ceaabfb' into upstream-merge
* commit 'd587e0787153f0224a6140c5015609963ceaabfb':
Revert "pci: interrupt disable bit support"
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 float32_to_s vs zero exponent.
target-alpha: Fix cvtlq.
target-alpha: Fix generic ctz64.
target-alpha: Implement fp branch/cmov inline.
target-alpha: Add placeholders for missing userspace PALcalls.
target-mips: No MIPS16 support for 4Kc, 4KEc cores
target-alpha: Fix compiler warning for gcc-4.3 (and older)
s390: Fix buggy assignment
target-mips: 4Kc, 4KEc cores do not support MIPS16
microblaze: Print content of EAR register
microblaze: Update debug logs.
tcg/ppc64: Fix loading of 32bit constants
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; } |