Browse code

milter: don't access _res when linking with mt lresolv

git-svn: trunk@4212

aCaB authored on 2008/10/01 01:26:18
Showing 2 changed files
... ...
@@ -1,3 +1,8 @@
1
+Tue Sep 30 18:28:28 CEST 2008 (acab)
2
+------------------------------------
3
+  * clamav-milter/clamav-milter.c: do not access _res when linking to a MT
4
+                                   lresolv - segfaults on netbsd?
5
+
1 6
 Tue Sep 30 18:32:50 EEST 2008 (edwin)
2 7
 -------------------------------------
3 8
   * libclamav/mbox.c: Scan textpart attachments on the fly,
... ...
@@ -2148,13 +2148,14 @@ main(int argc, char **argv)
2148 2148
 	logg(_("*Debugging is on\n"));
2149 2149
 
2150 2150
 #ifdef HAVE_RESOLV_H
2151
+#if ! defined(HAVE_LRESOLV_R)
2151 2152
 	if(!(_res.options&RES_INIT))
2152 2153
 		if(res_init() < 0) {
2153 2154
 			fprintf(stderr, "%s: Can't initialise the resolver\n",
2154 2155
 				argv[0]);
2155 2156
 			return EX_UNAVAILABLE;
2156 2157
 		}
2157
-
2158
+#endif
2158 2159
 	if(blacklist_time) {
2159 2160
 		char name[MAXHOSTNAMELEN + 1];
2160 2161