diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-09-21 12:36:48 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2011-12-22 11:53:58 +0100 |
commit | 128aa58947637b0989330c2e6a22a824d39e2193 (patch) | |
tree | a0e66b9499084abf822721d095094a904b3b4b83 /osdep.c | |
parent | 3777b09fd75ba746cf65d0ba30d73a5dd7a02d65 (diff) | |
download | qemu-128aa58947637b0989330c2e6a22a824d39e2193.zip qemu-128aa58947637b0989330c2e6a22a824d39e2193.tar.gz qemu-128aa58947637b0989330c2e6a22a824d39e2193.tar.bz2 |
move corking functions to osdep.c
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'osdep.c')
-rw-r--r-- | osdep.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -48,6 +48,15 @@ extern int madvise(caddr_t, size_t, int); #include "trace.h" #include "qemu_socket.h" +int socket_set_cork(int fd, int v) +{ +#if defined(SOL_TCP) && defined(TCP_CORK) + return setsockopt(fd, SOL_TCP, TCP_CORK, &v, sizeof(v)); +#else + return 0; +#endif +} + int qemu_madvise(void *addr, size_t len, int advice) { if (advice == QEMU_MADV_INVALID) { |