Package: cfengine2
Severity: normal
Tags: patch

When building 'cfengine2' on amd64 with gcc-4.0,
I get the following error:

cfagent.c: In function 'Initialize':
cfagent.c:301: warning: pointer targets in passing argument 1 of 'ElfHash' 
differ in signedness
if /cfengine2-2.1.10/debian/cc -DHAVE_CONFIG_H -I. -I. -I. -I/usr/include 
-I/usr/include  -pthread  -g -O2 -Wreturn-type -Wmissing-prototypes 
-Wuninitialized -pthread -Wall -g -O2 -I/usr/include   -Wall -g -O2 -MT init.o 
-MD -MP -MF ".deps/init.Tpo" -c -o init.o init.c; \
then mv -f ".deps/init.Tpo" ".deps/init.Po"; else rm -f ".deps/init.Tpo"; exit 
1; fi
In file included from init.c:33:
cf.extern.h:69: error: array type has incomplete element type

With the attached patch 'cfengine2' can be compiled
on amd64 using gcc-4.0.

Regards
Andreas Jochens

diff -urN ../tmp-orig/cfengine2-2.1.10/debian/patches/110_gcc4-fix 
./debian/patches/110_gcc4-fix
--- ../tmp-orig/cfengine2-2.1.10/debian/patches/110_gcc4-fix    1970-01-01 
01:00:00.000000000 +0100
+++ ./debian/patches/110_gcc4-fix       2005-03-15 20:47:04.937921831 +0100
@@ -0,0 +1,24 @@
+diff -urN tmp/src/cf.extern.h cfengine-2.1.10/src/cf.extern.h
+--- tmp/src/cf.extern.h        2004-08-02 14:14:04.000000000 +0200
++++ cfengine-2.1.10/src/cf.extern.h    2005-03-15 20:46:36.302468293 +0100
+@@ -66,7 +66,7 @@
+ extern char *tzname[2];
+ extern char *optarg;
+ extern int optind;
+-extern struct option OPTIONS[];
++extern struct option *OPTIONS;
+ extern int CFSIGNATURE;
+ extern char CFDES1[8];
+ extern char CFDES2[8];
+diff -urN tmp/src/globals.c cfengine-2.1.10/src/globals.c
+--- tmp/src/globals.c  2004-08-02 14:06:01.000000000 +0200
++++ cfengine-2.1.10/src/globals.c      2005-03-15 20:46:49.083992599 +0100
+@@ -387,7 +387,7 @@
+   /* GNU STUFF FOR LATER #include "getopt.h" */
+  
+  
+- PRIVATE struct option OPTIONS[] =
++ PRIVATE struct option *OPTIONS =
+       {
+       { "help",no_argument,0,'h' },
+       { "debug",optional_argument,0,'d' },


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to