This simple patch fixes compilation errors for ancient gcc and no doubt other compilers which don't grok C99 syntax.
--- cfengine-2.2.7/src/link.c.orig      2008-07-10 16:27:15.086297000 +0100
+++ cfengine-2.2.7/src/link.c   2008-07-10 16:27:23.913049000 +0100
@@ -396,8 +396,8 @@
   struct Image ip;
   char stamp[CF_BUFSIZE];
   time_t STAMPNOW;
-  STAMPNOW = time((time_t *)NULL);
   int nofile = false;
+  STAMPNOW = time((time_t *)NULL);
       
 memset(to,0,CF_BUFSIZE);
 memset(&ip,0,sizeof(ip));
--- cfengine-2.2.7/src/package.c.orig   2008-07-10 16:34:11.553954000 +0100
+++ cfengine-2.2.7/src/package.c        2008-07-10 16:34:49.246188000 +0100
@@ -2234,6 +2234,7 @@
 
 { FILE *pp;
   int match = 0;
+  int result;
   char line[CF_BUFSIZE];
   char pkgname[CF_BUFSIZE];
   char *pkgversion;
@@ -2276,7 +2277,7 @@
    snprintf(OUTPUT,CF_BUFSIZE,"%s\n",line);
    }
 
-int result =  cfpclose( pp );
+result =  cfpclose( pp );
 switch( result )
    {
    case 0: 
_______________________________________________
Bug-cfengine mailing list
[email protected]
https://cfengine.org/mailman/listinfo/bug-cfengine

Reply via email to