Skip to content
Snippets Groups Projects
Commit 8e1b59cb authored by Alexandre Julliard's avatar Alexandre Julliard
Browse files

rpcrt4: Disable TCP/IP connection support if we don't have socketpair.

parent bc85fb4c
No related branches found
No related tags found
No related merge requests found
......@@ -17791,6 +17791,7 @@ esac
 
 
 
 
 
for ac_func in \
......@@ -17848,6 +17849,7 @@ for ac_func in \
sigaltstack \
sigprocmask \
snprintf \
socketpair \
spawnvp \
statfs \
statvfs \
......
......@@ -1410,6 +1410,7 @@ AC_CHECK_FUNCS(\
sigaltstack \
sigprocmask \
snprintf \
socketpair \
spawnvp \
statfs \
statvfs \
......
......@@ -732,6 +732,8 @@ static RPC_STATUS rpcrt4_ncalrpc_parse_top_of_tower(const unsigned char *tower_d
/**** ncacn_ip_tcp support ****/
#ifdef HAVE_SOCKETPAIR
typedef struct _RpcConnection_tcp
{
RpcConnection common;
......@@ -1372,6 +1374,8 @@ static int rpcrt4_protseq_sock_wait_for_new_connection(RpcServerProtseq *protseq
return 1;
}
#endif /* HAVE_SOCKETPAIR */
static const struct connection_ops conn_protseq_list[] = {
{ "ncacn_np",
{ EPM_PROTOCOL_NCACN, EPM_PROTOCOL_SMB },
......@@ -1399,6 +1403,7 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncalrpc_get_top_of_tower,
rpcrt4_ncalrpc_parse_top_of_tower,
},
#ifdef HAVE_SOCKETPAIR
{ "ncacn_ip_tcp",
{ EPM_PROTOCOL_NCACN, EPM_PROTOCOL_TCP },
rpcrt4_conn_tcp_alloc,
......@@ -1412,6 +1417,7 @@ static const struct connection_ops conn_protseq_list[] = {
rpcrt4_ncacn_ip_tcp_get_top_of_tower,
rpcrt4_ncacn_ip_tcp_parse_top_of_tower,
}
#endif
};
......@@ -1435,6 +1441,7 @@ static const struct protseq_ops protseq_list[] =
rpcrt4_protseq_np_wait_for_new_connection,
rpcrt4_protseq_ncalrpc_open_endpoint,
},
#ifdef HAVE_SOCKETPAIR
{
"ncacn_ip_tcp",
rpcrt4_protseq_sock_alloc,
......@@ -1444,6 +1451,7 @@ static const struct protseq_ops protseq_list[] =
rpcrt4_protseq_sock_wait_for_new_connection,
rpcrt4_protseq_ncacn_ip_tcp_open_endpoint,
},
#endif
};
#define ARRAYSIZE(a) (sizeof((a)) / sizeof((a)[0]))
......
......@@ -663,6 +663,9 @@
/* Define to 1 if you have the `snprintf' function. */
#undef HAVE_SNPRINTF
/* Define to 1 if you have the `socketpair' function. */
#undef HAVE_SOCKETPAIR
/* Define to 1 if you have the <soundcard.h> header file. */
#undef HAVE_SOUNDCARD_H
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment