Package: worker
Severity: normal
Tags: patch

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

if g++ -DHAVE_CONFIG_H -I. -I. -I../src/aguix   -D_REENTRANT   -g -O2 
-fcheck-new -Wall -MT wconfigglb.o -MD -MP -MF ".deps/wconfigglb.Tpo" \
  -c -o wconfigglb.o `test -f 'wconfigglb.cc' || echo './'`wconfigglb.cc; \
then mv -f ".deps/wconfigglb.Tpo" ".deps/wconfigglb.Po"; \
else rm -f ".deps/wconfigglb.Tpo"; exit 1; \
fi
wconfigglb.cc:35: error: non-local variable '<anonymous struct> layoutDescr []' 
uses anonymous type
make[3]: *** [wconfigglb.o] Error 1
make[3]: Leaving directory `/worker-2.9.0/src'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/worker-2.9.0/src/wconfigglb.cc ./src/wconfigglb.cc
--- ../tmp-orig/worker-2.9.0/src/wconfigglb.cc  2004-12-20 19:50:08.000000000 
+0100
+++ ./src/wconfigglb.cc 2005-01-11 08:04:46.000000000 +0100
@@ -31,7 +31,7 @@
 #include <aguix/acontainerbb.h>
 #include <list>
 
-struct { WConfig::layoutID_t id;
+static struct { WConfig::layoutID_t id;
          int descr; } layoutDescr[] = { { WConfig::LO_STATEBAR, 556 },
                                         { WConfig::LO_CLOCKBAR, 557 },
                                         { WConfig::LO_BUTTONS, 558 },
diff -urN ../tmp-orig/worker-2.9.0/src/worker_shm.cc ./src/worker_shm.cc
--- ../tmp-orig/worker-2.9.0/src/worker_shm.cc  2004-12-20 19:50:08.000000000 
+0100
+++ ./src/worker_shm.cc 2005-01-11 08:25:49.658491056 +0100
@@ -33,7 +33,7 @@
     WSHMId = shmget( IPC_PRIVATE, /*a_max( SHMMIN, 4 )*/4, 0700 );
     if ( WSHMId != -1 ) {
       WSHMPtr = (char*)shmat( WSHMId, NULL, 0 );
-      if ( ( (int)WSHMPtr != -1 ) && ( WSHMPtr != NULL ) ) {
+      if ( ( (long)WSHMPtr != -1 ) && ( WSHMPtr != NULL ) ) {
         WSHMInit = true;
       }
     }


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

Reply via email to