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

This commit is contained in:
Alexandre Julliard 2008-12-22 19:55:05 +01:00
parent bc85fb4cd3
commit 8e1b59cb9a
4 changed files with 14 additions and 0 deletions

2
configure vendored
View File

@ -17791,6 +17791,7 @@ esac
for ac_func in \
@ -17848,6 +17849,7 @@ for ac_func in \
sigaltstack \
sigprocmask \
snprintf \
socketpair \
spawnvp \
statfs \
statvfs \

View File

@ -1410,6 +1410,7 @@ AC_CHECK_FUNCS(\
sigaltstack \
sigprocmask \
snprintf \
socketpair \
spawnvp \
statfs \
statvfs \

View File

@ -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]))

View File

@ -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