Package: libcdio
Severity: normal
Tags: patch

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

if x86_64-linux-gcc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib/ -I../include/   
     -Wall -g -O2 -Wall -Wchar-subscripts -Wmissing-prototypes 
-Wmissing-declarations -Wunused -Wpointer-arith -Wwrite-strings 
-Wnested-externs -Wno-sign-compare -MT cd-drive.o -MD -MP -MF 
".deps/cd-drive.Tpo" -c -o cd-drive.o cd-drive.c; \
then mv -f ".deps/cd-drive.Tpo" ".deps/cd-drive.Po"; else rm -f 
".deps/cd-drive.Tpo"; exit 1; fi
cd-drive.c:140: error: static declaration of 'gl_default_cdio_log_handler' 
follows non-static declaration
util.h:99: error: previous declaration of 'gl_default_cdio_log_handler' was here
make[3]: *** [cd-drive.o] Error 1
make[3]: Leaving directory `/libcdio-0.71/src'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/libcdio-0.71/src/cd-drive.c ./src/cd-drive.c
--- ../tmp-orig/libcdio-0.71/src/cd-drive.c     2004-11-14 01:03:52.000000000 
+0100
+++ ./src/cd-drive.c    2005-01-10 16:42:52.164577496 +0100
@@ -137,7 +137,7 @@
 
 /* CDIO logging routines */
 
-static cdio_log_handler_t gl_default_cdio_log_handler = NULL;
+static cdio_log_handler_t gl_default_cdio_log_handler_local = NULL;
 
 static void 
 _log_handler (cdio_log_level_t level, const char message[])
@@ -151,14 +151,14 @@
   if (level == CDIO_LOG_WARN  && opts.silent)
     return;
   
-  gl_default_cdio_log_handler (level, message);
+  gl_default_cdio_log_handler_local (level, message);
 }
 
 /* Initialize global variables. */
 static void 
 init(void) 
 {
-  gl_default_cdio_log_handler = cdio_log_set_handler (_log_handler);
+  gl_default_cdio_log_handler_local = cdio_log_set_handler (_log_handler);
 
   /* Default option values. */
   opts.silent        = false;
diff -urN ../tmp-orig/libcdio-0.71/src/cd-info.c ./src/cd-info.c
--- ../tmp-orig/libcdio-0.71/src/cd-info.c      2004-11-19 23:07:01.000000000 
+0100
+++ ./src/cd-info.c     2005-01-10 16:43:45.254506600 +0100
@@ -370,7 +370,7 @@
 
 /* CDIO logging routines */
 
-static cdio_log_handler_t gl_default_cdio_log_handler = NULL;
+static cdio_log_handler_t gl_default_cdio_log_handler_local = NULL;
 #ifdef HAVE_CDDB
 static cddb_log_handler_t gl_default_cddb_log_handler = NULL;
 #endif
@@ -390,7 +390,7 @@
   if (level == CDIO_LOG_WARN  && opts.silent)
     return;
   
-  gl_default_cdio_log_handler (level, message);
+  gl_default_cdio_log_handler_local (level, message);
 }
 
 static void 
@@ -789,7 +789,7 @@
 static void 
 init(void) 
 {
-  gl_default_cdio_log_handler = cdio_log_set_handler (_log_handler);
+  gl_default_cdio_log_handler_local = cdio_log_set_handler (_log_handler);
 #ifdef HAVE_CDDB
   gl_default_cddb_log_handler = cddb_log_set_handler (_log_handler);
 #endif
diff -urN ../tmp-orig/libcdio-0.71/src/iso-info.c ./src/iso-info.c
--- ../tmp-orig/libcdio-0.71/src/iso-info.c     2004-11-06 10:23:17.000000000 
+0100
+++ ./src/iso-info.c    2005-01-10 16:44:25.514386168 +0100
@@ -139,7 +139,7 @@
 
 /* CDIO logging routines */
 
-static cdio_log_handler_t gl_default_cdio_log_handler = NULL;
+static cdio_log_handler_t gl_default_cdio_log_handler_local = NULL;
 
 static void 
 _log_handler (cdio_log_level_t level, const char message[])
@@ -153,7 +153,7 @@
   if (level == CDIO_LOG_WARN  && opts.silent)
     return;
   
-  gl_default_cdio_log_handler (level, message);
+  gl_default_cdio_log_handler_local (level, message);
 }
 
 static void
@@ -246,7 +246,7 @@
 static void 
 init(void) 
 {
-  gl_default_cdio_log_handler = cdio_log_set_handler (_log_handler);
+  gl_default_cdio_log_handler_local = cdio_log_set_handler (_log_handler);
 
   /* Default option values. */
   opts.silent        = false;


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

Reply via email to