[Pkg-alsa-devel] Bug#285083: alsa-lib: FTBFS (amd64/gcc-4.0): invalid storage class for function 'shm_sum_discard'
Andreas Jochens
Andreas Jochens <aj@andaco.de>, 285083@bugs.debian.org
Fri, 10 Dec 2004 16:25:32 +0100
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;