[Varnish] #130: Build of varnishhist, varnishstat and varnishtop fails with gcc 4.2.0

Varnish varnish-bugs at projects.linpro.no
Fri Jul 20 18:00:12 CEST 2007


#130: Build of varnishhist, varnishstat and varnishtop fails with gcc 4.2.0
--------------------+-------------------------------------------------------
 Reporter:  cs      |       Owner:  des  
     Type:  defect  |      Status:  new  
 Priority:  normal  |   Milestone:       
Component:  build   |     Version:  trunk
 Severity:  normal  |    Keywords:       
--------------------+-------------------------------------------------------
 Build of varnishhist, varnishstat and varnishtop fails. This happens with
 non-vendor gcc 4.2.0 on FreeBSD 6.2/i386 building Varnish 1.1 (but trunk
 should be affected as well).

 IIRC, C99 compilers require stdbool.h for the definition of 'false'

 {{{
 [...]
 Making all in varnishhist
 /openpkg-dev/bin/cc -DHAVE_CONFIG_H -I. -I../.. -I../../include  -I
 /openpkg-dev/include -I/openpkg-dev/include/ncurses -DOPKG_PIDFILE
 =\"/openpkg-dev/var/varnish/varnishd.pid\" -include config.h -O2 -pipe -MT
 varnishhist-varnishhist.o -MD -MP -MF .deps/varnishhist-varnishhist.Tpo -c
 -o varnishhist-varnishhist.o `test -f 'varnishhist.c' || echo
 './'`varnishhist.c
 varnishhist.c: In function 'do_curses':
 varnishhist.c:250: error: 'false' undeclared (first use in this function)
 varnishhist.c:250: error: (Each undeclared identifier is reported only
 once
 varnishhist.c:250: error: for each function it appears in.)
 make[3]: *** [varnishhist-varnishhist.o] Error 1
 make[2]: *** [all-recursive] Error 1
 make[1]: *** [all-recursive] Error 1
 make: *** [all] Error 2
 error: Bad exit status from /u/cs/tmp/openpkg/rpm-tmp.2106 (%build)
 }}}

 Following diff fixes the problem

 {{{
 Index: bin/varnishhist/varnishhist.c
 --- bin/varnishhist/varnishhist.c.orig  2007-07-20 13:30:04 +0200
 +++ bin/varnishhist/varnishhist.c       2007-07-20 16:16:26 +0200
 @@ -41,6 +41,7 @@
  #include <signal.h>
  #include <stdio.h>
  #include <stdlib.h>
 +#include <stdbool.h>
  #include <string.h>
  #include <unistd.h>

 Index: bin/varnishstat/varnishstat.c
 --- bin/varnishstat/varnishstat.c       2007-07-20 13:30:04 +0200
 +++ bin/varnishstat/varnishstat.c       2007-07-20 16:18:58 +0200
 @@ -40,6 +40,7 @@
  #include <signal.h>
  #include <stdio.h>
  #include <stdlib.h>
 +#include <stdbool.h>
  #include <string.h>
  #include <time.h>
  #include <unistd.h>
 Index: bin/varnishtop/varnishtop.c
 --- bin/varnishtop/varnishtop.c.orig    2007-07-20 13:30:04 +0200
 +++ bin/varnishtop/varnishtop.c 2007-07-20 16:22:58 +0200
 @@ -39,6 +39,7 @@
  #include <signal.h>
  #include <stdio.h>
  #include <stdlib.h>
 +#include <stdbool.h>
  #include <string.h>
  #include <unistd.h>
  #include <limits.h>
 }}}

-- 
Ticket URL: <http://varnish.projects.linpro.no/ticket/130>
Varnish <http://varnish.projects.linpro.no/>
The Varnish HTTP Accelerator


More information about the varnish-bugs mailing list