diff options
author | Eric S. Raymond <esr@thyrsus.com> | 1998-12-15 15:45:46 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 1998-12-15 15:45:46 +0000 |
commit | 0273620bc4c9cea9070a15f3164467075b3a93cd (patch) | |
tree | 941203270b6f9113a0d9546e3d7e139588cb5860 /socket.c | |
parent | f25af5faf997e3b48c69fd1dc3f931d37b32deaa (diff) | |
download | fetchmail-0273620bc4c9cea9070a15f3164467075b3a93cd.tar.gz fetchmail-0273620bc4c9cea9070a15f3164467075b3a93cd.tar.bz2 fetchmail-0273620bc4c9cea9070a15f3164467075b3a93cd.zip |
Enable build without socketpair.
svn path=/trunk/; revision=2276
Diffstat (limited to 'socket.c')
-rw-r--r-- | socket.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -44,6 +44,7 @@ static int h_errno; #include <net/security.h> #endif /* NET_SECURITY */ +#ifdef HAVE_SOCKETPAIR static int handle_plugin(const char *host, const char *service, const char *plugin) /* get a socket mediated through a given external command */ @@ -70,6 +71,7 @@ static int handle_plugin(const char *host, return fds[1]; } } +#endif /* HAVE_SOCKETPAIR */ #if INET6 int SockOpen(const char *host, const char *service, const char *options, @@ -82,8 +84,10 @@ int SockOpen(const char *host, const char *service, const char *options, int requestlen; #endif /* NET_SECURITY */ +#ifdef HAVE_SOCKETPAIR if (plugin) return handle_plugin(host,service,plugin); +#endif /* HAVE_SOCKETPAIR */ memset(&req, 0, sizeof(struct addrinfo)); req.ai_socktype = SOCK_STREAM; @@ -133,11 +137,13 @@ int SockOpen(const char *host, int clientPort, const char *options, struct sockaddr_in ad; struct hostent *hp; +#ifdef HAVE_SOCKETPAIR if (plugin) { char buf[10]; sprintf(buf,"%d",clientPort); return handle_plugin(host,buf,plugin); } +#endif /* HAVE_SOCKETPAIR */ memset(&ad, 0, sizeof(ad)); ad.sin_family = AF_INET; |