[Varnish] #147: compile errors

Varnish varnish-bugs at projects.linpro.no
Fri Aug 10 00:19:37 CEST 2007


#147: compile errors
--------------------+-------------------------------------------------------
 Reporter:  MrDigi  |       Owner:  des
     Type:  defect  |      Status:  new
 Priority:  normal  |   Milestone:     
Component:  build   |     Version:  1.1
 Severity:  normal  |    Keywords:     
--------------------+-------------------------------------------------------
 Under gcc 2.95 (I know its old but it can't be wrong that it compiles
 there, too :) no variable declaration in the "middle" of the code is
 allowed:

 --- vanish11old/bin/varnishadm/varnishadm.c     Fri Jul 20 13:30:04 2007
 +++ varnish-1.1/bin/varnishadm/varnishadm.c     Thu Aug  9 23:37:22 2007
 @@ -51,6 +51,7 @@
         struct vss_addr **ta;
         char *addr, *port;
         int i, n;
 +       int sock;
         long status, bytes;
         char *answer = NULL;
         char buf[13];
 @@ -65,7 +66,7 @@
                 exit(2);
         }

 -       int sock = VSS_connect(ta[0]);
 +       sock = VSS_connect(ta[0]);

         for (i = 0; i < n; ++i) {
                 free(ta[i]);

 --- vanish11old/bin/varnishd/storage_file.c     Fri Jul 20 13:30:04 2007
 +++ varnish-1.1/bin/varnishd/storage_file.c     Thu Aug  9 23:45:08 2007
 @@ -122,12 +122,14 @@
         int i, explicit;
         off_t o;
         struct stat st;
 +#if defined(HAVE_SYS_MOUNT_H) || defined(HAVE_SYS_VFS_H)
 +       struct statfs fsst;
 +#endif

         AN(sc);
         AZ(fstat(sc->fd, &st));

  #if defined(HAVE_SYS_MOUNT_H) || defined(HAVE_SYS_VFS_H)
 -       struct statfs fsst;
         AZ(fstatfs(sc->fd, &fsst));
  #endif

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


More information about the varnish-bugs mailing list