$OpenBSD: patch-pop2_c,v 1.1 2000/06/05 00:31:34 espie Exp $
--- pop2.c.orig	Tue Sep 12 01:10:44 1995
+++ pop2.c	Mon Jun  5 02:15:41 2000
@@ -67,6 +67,7 @@
 
 #include  <sys/time.h>
 #include  <errno.h>
+#include  <netdb.h>
 
 #include  "socket.h"
 #include  "popclient.h"
@@ -134,7 +135,10 @@ struct optrec *options;
 
   /* open the socket to the POP server */
   if ((socket = Socket(servername,POP2_PORT)) < 0) {
-    perror("doPOP2: socket");
+    if (socket == -2)
+	herror("doPOP2: socket");
+    else
+    	perror("doPOP2: socket");
     return(PS_SOCKET);
   }
     
