[Pkg-alsa-devel] Bug#285083: marked as done (alsa-lib: FTBFS (amd64/gcc-4.0): invalid storage class for function 'shm_sum_discard')

Debian Bug Tracking System owner@bugs.debian.org
Sun, 12 Dec 2004 03:03:10 -0800


Your message dated Sun, 12 Dec 2004 11:44:55 +0100
with message-id <32320812@web.de>
and subject line invalid storage class
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--------------------------------------
Received: (at submit) by bugs.debian.org; 10 Dec 2004 15:21:17 +0000
>From aj@andaco.de Fri Dec 10 07:21:17 2004
Return-path: <aj@andaco.de>
Received: from c158155.adsl.hansenet.de (localhost.localdomain) [213.39.158.155] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1Ccma4-0005tI-00; Fri, 10 Dec 2004 07:21:16 -0800
Received: from aj by localhost.localdomain with local (Exim 4.34)
	id 1CcmeC-0005vZ-HT; Fri, 10 Dec 2004 16:25:32 +0100
To: Debian Bug Tracking System <submit@bugs.debian.org>
From: Andreas Jochens <aj@andaco.de>
Subject: alsa-lib: FTBFS (amd64/gcc-4.0): invalid storage class for function 'shm_sum_discard'
Message-Id: <E1CcmeC-0005vZ-HT@localhost.localdomain>
Date: Fri, 10 Dec 2004 16:25:32 +0100
Delivered-To: submit@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-8.0 required=4.0 tests=BAYES_00,HAS_PACKAGE 
	autolearn=no version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

Package: alsa-lib
Severity: normal
Tags: patch

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

 x86_64-linux-gcc -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -g -Wall -O2 -MT pcm_dmix.lo -MD -MP -MF .deps/pcm_dmix.Tpo -c pcm_dmix.c  -fPIC -DPIC -o .libs/pcm_dmix.o
pcm_dmix.c: In function 'shm_sum_create_or_connect':
pcm_dmix.c:61: error: invalid storage class for function 'shm_sum_discard'
make[3]: *** [pcm_dmix.lo] Error 1
make[3]: Leaving directory `/alsa-lib-1.0.7/src/pcm'

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

Regards
Andreas Jochens

diff -urN ../tmp-orig/alsa-lib-1.0.7/src/conf.c ./src/conf.c
--- ../tmp-orig/alsa-lib-1.0.7/src/conf.c	2004-10-05 17:33:04.000000000 +0200
+++ ./src/conf.c	2004-12-10 16:06:16.644746376 +0100
@@ -2486,6 +2486,8 @@
 				snd_config_searcha, snd_config_searchva);
 }
 
+static int snd_config_hooks(snd_config_t *config, snd_config_t *private_data);
+
 /**
  * \brief Searches for a node in a configuration tree and expands hooks.
  * \param config Handle to the root of the configuration (sub)tree to search.
@@ -2496,7 +2498,6 @@
  */
 int snd_config_search_hooks(snd_config_t *config, const char *key, snd_config_t **result)
 {
-	static int snd_config_hooks(snd_config_t *config, snd_config_t *private_data);
 	SND_CONFIG_SEARCH(config, key, result, \
 					err = snd_config_hooks(config, NULL); \
 					if (err < 0) \
@@ -2504,6 +2505,8 @@
 			 );
 }
 
+static int snd_config_hooks(snd_config_t *config, snd_config_t *private_data);
+
 /**
  * \brief Searches for a node in a configuration tree, expanding aliases and hooks.
  * \param root Handle to the root configuration node containing alias
@@ -2516,7 +2519,6 @@
  */
 int snd_config_searcha_hooks(snd_config_t *root, snd_config_t *config, const char *key, snd_config_t **result)
 {
-	static int snd_config_hooks(snd_config_t *config, snd_config_t *private_data);
 	SND_CONFIG_SEARCHA(root, config, key, result,
 					snd_config_searcha_hooks,
 					err = snd_config_hooks(config, NULL); \
diff -urN ../tmp-orig/alsa-lib-1.0.7/src/pcm/pcm_dmix.c ./src/pcm/pcm_dmix.c
--- ../tmp-orig/alsa-lib-1.0.7/src/pcm/pcm_dmix.c	2004-10-29 12:56:22.000000000 +0200
+++ ./src/pcm/pcm_dmix.c	2004-12-10 16:03:48.061334488 +0100
@@ -53,12 +53,13 @@
  *
  */
 
+static int shm_sum_discard(snd_pcm_direct_t *dmix);
+
 /*
  *  sum ring buffer shared memory area 
  */
 static int shm_sum_create_or_connect(snd_pcm_direct_t *dmix)
 {
-	static int shm_sum_discard(snd_pcm_direct_t *dmix);
 	struct shmid_ds buf;
 	int tmpid, err;
 	size_t size;

---------------------------------------
Received: (at 285083-done) by bugs.debian.org; 12 Dec 2004 10:45:30 +0000
>From falk@debian.org Sun Dec 12 02:45:30 2004
Return-path: <falk@debian.org>
Received: from fmmailgate05.web.de [217.72.192.243] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1CdREH-00063a-00; Sun, 12 Dec 2004 02:45:29 -0800
Received: by fmmailgate05.web.de (8.12.10/8.12.10/webde Linux 0.7) with SMTP id iBCAiK78024980
        for 285083-done@bugs.debian.org; Sun, 12 Dec 2004 11:44:58 +0100
Received: from 80.144.182.171 by freemailng5701.web.de with HTTP;
	Sun, 12 Dec 2004 11:44:55 +0100
Date: Sun, 12 Dec 2004 11:44:55 +0100
Message-Id: <32320812@web.de>
MIME-Version: 1.0
From: "Falk Hueffner" <falk@debian.org>
To: 285083-done@bugs.debian.org
Subject: invalid storage class
Precedence: fm-user
X-WEBDE-Sender: <falk.hueffner@web.de>
Organization: http://freemail.web.de/
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
Delivered-To: 285083-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_03_25 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=-3.0 required=4.0 tests=BAYES_00 autolearn=no 
	version=2.60-bugs.debian.org_2004_03_25
X-Spam-Level: 

ISO/IEC 9899:1999, p. 30: "A function declaration can contain the
storage-class specifier 'static' only if it is at file scope[.]"

Falk