mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-02 15:23:53 -06:00
build-sys: add HAVE_IPPROTO_MPTCP
The QAPI schema shouldn't rely on C system headers #define, but on configure-time project #define, so we can express the build condition in a C-independent way. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20210907121943.3498701-3-marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
This commit is contained in:
parent
fcb3ab341a
commit
653163fcbc
4 changed files with 7 additions and 5 deletions
|
@ -278,7 +278,7 @@ static int inet_listen_saddr(InetSocketAddress *saddr,
|
|||
|
||||
/* create socket + bind/listen */
|
||||
for (e = res; e != NULL; e = e->ai_next) {
|
||||
#ifdef IPPROTO_MPTCP
|
||||
#ifdef HAVE_IPPROTO_MPTCP
|
||||
if (saddr->has_mptcp && saddr->mptcp) {
|
||||
e->ai_protocol = IPPROTO_MPTCP;
|
||||
}
|
||||
|
@ -462,7 +462,7 @@ int inet_connect_saddr(InetSocketAddress *saddr, Error **errp)
|
|||
error_free(local_err);
|
||||
local_err = NULL;
|
||||
|
||||
#ifdef IPPROTO_MPTCP
|
||||
#ifdef HAVE_IPPROTO_MPTCP
|
||||
if (saddr->has_mptcp && saddr->mptcp) {
|
||||
e->ai_protocol = IPPROTO_MPTCP;
|
||||
}
|
||||
|
@ -699,7 +699,7 @@ int inet_parse(InetSocketAddress *addr, const char *str, Error **errp)
|
|||
}
|
||||
addr->has_keep_alive = true;
|
||||
}
|
||||
#ifdef IPPROTO_MPTCP
|
||||
#ifdef HAVE_IPPROTO_MPTCP
|
||||
begin = strstr(optstr, ",mptcp");
|
||||
if (begin) {
|
||||
if (inet_parse_flag("mptcp", begin + strlen(",mptcp"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue