Bug report.

Igor Timkin ivt at gamma.ru
Fri May 12 00:15:35 UTC 2000


Jaye Mathisen writes:
> 
> 
> FreeBSD 2.2.8, May 11th snapshot.
> 
> Compilation failed:
> 
> cd nnrpd     && make all
> gcc -g -O2 -I../include    -c article.c
> gcc -g -O2 -I../include    -c group.c
> gcc -g -O2 -I../include    -c commands.c
> gcc -g -O2 -I../include    -c loadave.c
> gcc -g -O2 -I../include    -c misc.c
> gcc -g -O2 -I../include    -c newnews.c
> gcc -g -O2 -I../include    -c nnrpd.c
> gcc -g -O2 -I../include
> -I/usr/local/lib/perl5/5.00502/i386-freebsd/CORE -c perl.c
> gcc -g -O2 -I../include    -c perm.c
> gcc -g -O2 -I../include    -c post.c
> post.c: In function `ProcessHeaders':
> post.c:392: `tzname' undeclared (first use this function)
> post.c:392: (Each undeclared identifier is reported only once
> post.c:392: for each function it appears in.)
> *** Error code 1
> 
> Stop.
> *** Error code 1
> 
> 
> Configured with ./configure --prefix=/news --with-perl

2.2.8 don't has tzname variable. From man 3 localtime:
     Use of the external variable tzname is discouraged; the tm_zone entry in
     the tm structure is preferred.

Use this patch:
diff -u nnrpd/post.c nnrpd/post.c.NEW
--- nnrpd/post.c	Wed May 10 14:01:10 2000
+++ nnrpd/post.c.NEW	Fri May 12 04:08:00 2000
@@ -386,7 +386,7 @@
 	        local->tm_mday, &MONTHS[3 * local->tm_mon], 1900 + local->tm_year,
 	        local->tm_hour, local->tm_min, local->tm_sec,
 #ifdef HAVE_TM_GMTOFF
-#ifdef __bsdi__
+#if defined(__bsdi__) || defined (__FreeBSD__)
 		local->tm_gmtoff/36, local->tm_zone);
 #else
 	        local->tm_gmtoff/36, tzname[0]);



More information about the inn-bugs mailing list