Error during make

Robin Sommer sommer at in.tum.de
Thu Sep 26 00:56:53 PDT 2002


On Thu, Sep 26, 2002 at 15:43 +0800, Wang Shaofu wrote:

> Error as the same. And more error

I guess that you're using Linux, right? Please try the attached
patch. But even if it helps, you may get more errors during linking
(which I haven't tried to solve yet).

Robin

-- 
Robin Sommer * Room        01.08.055 * 
TU Munich    * Phone (089) 289-18006 * sommer at in.tum.de 
-------------- next part --------------
diff -uNr bro-pub-0.8a1/nb_dns.c bro-patched/nb_dns.c
--- bro-pub-0.8a1/nb_dns.c	Thu Jul 22 01:51:28 1999
+++ bro-patched/nb_dns.c	Mon Sep 23 18:01:02 2002
@@ -311,7 +311,7 @@
 	}
 	if (ns_initparse((u_char *)msg, msglen, &handle) < 0) {
 		sprintf(errstr, "ns_initparse(): %s", my_strerror(errno));
-		nr->h_errno = NO_RECOVERY;
+		nr->host_errno = NO_RECOVERY;
 		return (-1);
 	}
 
@@ -345,11 +345,11 @@
 	switch (ns_msg_getflag(handle, ns_f_rcode)) {
 
 	case ns_r_nxdomain:
-		nr->h_errno = HOST_NOT_FOUND;
+		nr->host_errno = HOST_NOT_FOUND;
 		return (1);
 
 	case ns_r_servfail:
-		nr->h_errno = TRY_AGAIN;
+		nr->host_errno = TRY_AGAIN;
 		return (1);
 
 	case ns_r_noerror:
@@ -359,7 +359,7 @@
 	case ns_r_notimpl:
 	case ns_r_refused:
 	default:
-		nr->h_errno = NO_RECOVERY;
+		nr->host_errno = NO_RECOVERY;
 		return (1);
 	}
 
@@ -382,7 +382,7 @@
 		/* Parse next record */
 		if (ns_parserr(&handle, ns_s_an, -1, &rr) < 0) {
 			if (errno != ENODEV) {
-				nr->h_errno = NO_RECOVERY;
+				nr->host_errno = NO_RECOVERY;
 				return (1);
 			}
 			/* All done */
@@ -400,7 +400,7 @@
 
 		case T_A:
 			if (rdlen != NS_INADDRSZ) {
-				nr->h_errno = NO_RECOVERY;
+				nr->host_errno = NO_RECOVERY;
 				return (1);
 			}
 
@@ -417,7 +417,7 @@
 			    (const u_char *)msg + msglen, rdata, bp, ep - bp);
 			if (n < 0) {
 				/* XXX return -1 here ??? */
-				nr->h_errno = NO_RECOVERY;
+				nr->host_errno = NO_RECOVERY;
 				return (1);
 			}
 			he->h_name = bp;
diff -uNr bro-pub-0.8a1/nb_dns.h bro-patched/nb_dns.h
--- bro-pub-0.8a1/nb_dns.h	Thu Jul 22 01:51:27 1999
+++ bro-patched/nb_dns.h	Mon Sep 23 18:00:44 2002
@@ -26,7 +26,7 @@
 /* Public data */
 struct nb_dns_result {
 	void *cookie;
-	int h_errno;
+	int host_errno;
 	struct hostent *hostent;
 };
 
--- bro-pub-0.8a1/DNS_Mgr.cc	Sun Sep 15 01:57:14 2002
+++ bro-patched/DNS_Mgr.cc	Mon Sep 23 18:22:09 2002
@@ -658,7 +658,7 @@
 
 void DNS_Mgr::AddResult(DNS_Mgr_Request* dr, struct nb_dns_result* r)
 	{
-	hostent* h = (r && r->h_errno == 0) ? r->hostent : 0;
+	hostent* h = (r && r->host_errno == 0) ? r->hostent : 0;
 
 	DNS_Mapping* new_dm;
 	DNS_Mapping* prev_dm;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
Url : http://mailman.ICSI.Berkeley.EDU/pipermail/bro/attachments/20020926/c9891101/attachment.bin 


More information about the Bro mailing list