From: Stefan Hajnoczi <stefanha@redhat.com>
To: qemu-devel@nongnu.org
Cc: Anthony Liguori <aliguori@us.ibm.com>,
Lei Li <lilei@linux.vnet.ibm.com>,
Stefan Hajnoczi <stefanha@redhat.com>
Subject: [Qemu-devel] [PATCH 4/8] osdep: replace setsockopt by qemu_setsockopt
Date: Fri, 8 Mar 2013 13:21:31 +0100 [thread overview]
Message-ID: <1362745295-16398-5-git-send-email-stefanha@redhat.com> (raw)
In-Reply-To: <1362745295-16398-1-git-send-email-stefanha@redhat.com>
From: Lei Li <lilei@linux.vnet.ibm.com>
Fix the compiler warning when cross build qemu-ga
for windows by using qemu_setsockopt() instead of
setsockopt().
util/osdep.c: In function 'socket_set_nodelay':
util/osdep.c:69:5: warning: passing argument 4 of 'setsockopt' from
incompatible pointer type [enabled by default]
In file included from /home/lei/qemu_b/include/sysemu/os-win32.h:30:0,
from /home/lei/qemu_b/include/qemu-common.h:46,
from util/osdep.c:48:
/usr/i686-w64-mingw32/sys-root/mingw/include/winsock2.h:990:63: note:
expected 'const char *' but argument is of type 'int *'
Signed-off-by: Lei Li <lilei@linux.vnet.ibm.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
---
util/osdep.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/util/osdep.c b/util/osdep.c
index c408261..bd59ac9 100644
--- a/util/osdep.c
+++ b/util/osdep.c
@@ -57,7 +57,7 @@ static const char *qemu_version = QEMU_VERSION;
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));
+ return qemu_setsockopt(fd, SOL_TCP, TCP_CORK, &v, sizeof(v));
#else
return 0;
#endif
@@ -66,7 +66,7 @@ int socket_set_cork(int fd, int v)
int socket_set_nodelay(int fd)
{
int v = 1;
- return setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &v, sizeof(v));
+ return qemu_setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &v, sizeof(v));
}
int qemu_madvise(void *addr, size_t len, int advice)
--
1.8.1.4
next prev parent reply other threads:[~2013-03-08 12:21 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-08 12:21 [Qemu-devel] [PULL v2 0/8] Trivial patches for 22 February to 8 March 2013 Stefan Hajnoczi
2013-03-08 12:21 ` [Qemu-devel] [PATCH 1/8] configure: Create link to icon bitmap for out-of-tree builds Stefan Hajnoczi
2013-03-08 12:21 ` [Qemu-devel] [PATCH 2/8] rtc-test: Fix test failures with recent glib Stefan Hajnoczi
2013-03-08 12:21 ` [Qemu-devel] [PATCH 3/8] lm32: remove unused function Stefan Hajnoczi
2013-03-08 12:21 ` Stefan Hajnoczi [this message]
2013-03-08 12:21 ` [Qemu-devel] [PATCH 5/8] configure: Require at least spice-protocol-0.12.3 Stefan Hajnoczi
2013-03-08 12:21 ` [Qemu-devel] [PATCH 6/8] rng-random: Use qemu_open / qemu_close Stefan Hajnoczi
2013-03-08 12:21 ` [Qemu-devel] [PATCH 7/8] pci_host: Drop write-only address_space field Stefan Hajnoczi
2013-03-08 12:21 ` [Qemu-devel] [PATCH 8/8] Fix the wrong description in qemu manual Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1362745295-16398-5-git-send-email-stefanha@redhat.com \
--to=stefanha@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=lilei@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).