]> Pileus Git - ~andy/fetchmail/commitdiff
Enable build without socketpair.
authorEric S. Raymond <esr@thyrsus.com>
Tue, 15 Dec 1998 15:45:46 +0000 (15:45 -0000)
committerEric S. Raymond <esr@thyrsus.com>
Tue, 15 Dec 1998 15:45:46 +0000 (15:45 -0000)
svn path=/trunk/; revision=2276

NEWS
configure.in
socket.c

diff --git a/NEWS b/NEWS
index a6658146515bf4807c404a2501ceddf9aa7692e8..1166f649af9c329713c048b28ec4d0c700fc3a1f 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
                                Release Notes:
 
+fetchmail-4.7.1 ():
+* Enable fetchmail to build correctly on systems without socketpair.
+
 fetchmail-4.7.0 (Mon Dec 14 12:05:27 EST 1998):
 * Minor correction to make i18n subdirectory builds work better.
 * Rob Funk's old-message-check optimization.
index da24a7d9045d6ea466cb851f263223a0281b020f..39c81b1e96dd4c31a9ca561c7e56a407d1089a83 100644 (file)
@@ -124,7 +124,7 @@ AC_SUBST(EXTRAOBJ)
 
 AC_CHECK_FUNCS(tcsetattr stty setsid seteuid gethostbyname res_search herror \
   strrchr strerror setlinebuf syslog snprintf vprintf vsnprintf vsyslog \
-  atexit inet_aton strftime setrlimit)
+  atexit inet_aton strftime setrlimit socketpair)
 
 # Under Red Hat 4.0 (and many other Linuxes) -lresolv is seriously flaky
 # and breaks gethostbyname(2).  It's better to use the bind stuff in the C
index 43218b95f52c34c932de060bdf885217a48d7bcf..7e11a70162af0537cc049f5a19a03dca2648fde9 100644 (file)
--- a/socket.c
+++ b/socket.c
@@ -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;